kofstreet's Forum Posts

  • Thank you for the answer and thank you for all the work you do for the community

  • I want to add float numbers in my calculation, but I don't understand why I'm getting different results than my calculator:

    Browser.alert(float(4.8)*6) gives me 28.79999999 rather than 28.8

    see example in screenshot

    Tagged:

  • Yes, using the Html Element with some CSS.

    Yes possible, but will not be manipulated as normal object.

  • Hi,

    Implementing SVG in C3 was an amazing idea, is there any possibility for making animated SVG possible?

    Thanks.

    Tagged:

  • Probably your AJAX data is downloaded in one large chunk, that's why it's not triggering On Progress event.. Or it may be a bug.

    I don't know exacly what's happening, would really appreciate if there is a working example for testing how the On Progress event is triggered.

  • no one has an answer to my request?

  • Is your ajax tag set on properly? Case sensitive.

    Yes my tag is copy past from AJAX.Request to AJAX.OnProgress event.

  • Hi,

    I tried to get a large file from my database, usually it takes many seconds to get on completed trigger on AJAX, I tried to put on progress event to indicate to the user the progress by updating a ProgressBar value by int(AJAX.progress*100), the problem is that On progress event never trigger, am I missing something to get this to work?

    this is my loop:

    ON start of Layout -> AJAX.Request ("LargeFile")

    AJAX On Progress -> ProgressBar.SetProgress int(AJAX.progress*100)

    Thanks

    Tagged:

  • Same problem for me, server side error I think.

  • That's been a topic for a while. Last I heard iphone resize could be turned off in config, but for Android (it's

    an android issue) it requires a homemade keyboard. I'm commenting to be on this thread, curious if anything has changed.

    For my first game (compiled with cocoon), I had to setup my own custom made keyboard, but now my app is based on multilanguage input (arabic included).

    Waiting and see if anyone had a way to bypass this issue.

    Thanks for the reply.

  • On mobile none full screen web export, when keyboard appears, the screen is resized to fit the remaining space. Is there any way to prevent screen from resizing and allowing keyboard input?

    Thanks

  • > 1) collision polygon in a sprite is not allowed when dealing with a large number of vertices.

    I tried adding about 300 points to the collision polygon with that addon and it was working fine. Of course, I wouldn't do it on every tick.

    4000 vertices is a bit too much. I'm curious why do you need that many?

    I need it for drawing a parcel on a map. 4000 is the average number of vertices.

  • Here's some examples:

    c2:

    https://www.dropbox.com/s/rpi4nzhd763b4l6/pointInPoly.capx?dl=1

    https://www.dropbox.com/s/65neg3btcb6mdzr/pointInPoly2.capx?dl=1

    c3:

    https://www.dropbox.com/s/ga41909z93g71nq/pointInPoly2.c3p?dl=1

    I ended up converting the text point list to an array, but otherwise the math is the same.

    Thanks, this is what I'm looking for.

    My example without array:

    we.tl/t-2oO3RG9BoP

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > 1) collision polygon in a sprite is not allowed when dealing with a large number of vertices.

    I tried adding about 300 points to the collision polygon with that addon and it was working fine. Of course, I wouldn't do it on every tick.

    4000 vertices is a bit too much. I'm curious why do you need that many?

    I need for parcel managing in a map.

  • For the math method you can do it by looking at a line from the point going down. If it crosses an odd amount of lines it’s inside the polygon, otherwise it’s inside.

    Here is what the events would look like if you just had sprites making up the points. You could use an array or text list but I’ll leave that as something that would need to be adapted.

    Global number x=100

    Global number y=100

    Global number inside=0

    Global number i=0

    Global number j=0

    Repeat p.count times

    — set i to loopindex

    — set j to (i+1)%p.count

    — value (x-p(i).x)/(p(j).x-p(i).x) is between 0 and 1

    — y > (p(j).y-p(i).y)/(p(j).x-p(i).x)*(x-p(i).x)+p(i).y

    — — set inside to 1-inside

    will appreciate a lot if you can translate your math method in an example on construct.