R0J0hound's Forum Posts

  • It's a bit off topic, but I find "Wait 0 seconds" to be a hacky solution in most cases. It's used in cases where new objects aren't pickable yet and when used multiple times it makes the game logic very hard to debug.

  • I don't know. It could be something to try.

  • It's just an issue of memory not being freed. There's no such thing as a memory purge. When a object is resized it's physics shape is re-created, so presumably the old shape isn't being freed. To fix it the plugin needs to be corrected, or worst case it's an issue with the physics library itself that would need to be corrected.

    As a user to get it fixed you have a few options:

    1. Report it to the bugs forum following the reporting guidelines. Likely there is some kind of triage of what gets fixed, but this alerts the creator, who is most familiar with the code, about the problem.

    2. Dive into the plugin code and find a fix yourself. Not easy, but a good learning experience although likely time consuming. If a fix is found then alerting the developer in the bug report is a good way to have the plugin officially fixed if it's a good solution.

    3. Use another physics plugin. You could try the chipmunk physics plugin. It doesn't have the memory issue.

  • Here's an old attempt at the right triangle idea:

    https://dl.dropboxusercontent.com/u/542 ... right.capx

    It still has issues but any triangle can be made with two right triangles.

  • Just make your keys "group/item"

  • I guess you could use a different approach by having a speed variable. The you increase/decrease the speed if the calculated stopping distance less or greater than the anglediff.

    So maybe this?

  • In general javascript errors are bugs that need to be reported. The asm.js version is faster but it has that memory limit, which has been reported several times.

  • You can do a concave polygon without plugins by overlapping multiple rectangular sprites with a blend mode, but you need a layer per poly.

    To do any polygon you can do it with a right triangle sprite. Basically you triangulate the polygon then break the triangles up into right triangles.

    The canvas plugin allows you to use features of the html5 canvas to draw stuff. It has bad performance with webgl though since the canvas needs to be copied to a webgl texture every frame the image is changed.

    The Paster plugin is kind of Canvas 2.0 since it doesn't have a slowdown when webgl is used. It only has a draw quad feature instead of all the other canvas drawing features mainly due to technical reasons, However quads can be used for triangles by having two points the same.

  • In the project properties change "physics engine" to "box2d web"

  • Maybe the enable/disable collisions action of the physics behavior would be of use then.

  • The green arrow means it's a trigger most of the time. "On collision" is actually equivalent to "is overlapping" and "trigger once". If you want to check for a collision in a function just use the "is overlapping" condition.

  • If you have the center angle you can do something like

    set angle to centerAngle+calmp(angle(0,0,cos(angle-centerAngle),sin(angle-centerAngle)), -45,45)

  • NES graphics were done with tiles like you say, but most games made use of larger sprites by combining multiple tiles together. You could look for an nes emulator with a debug view to look at it I guess.

  • You could use the canvas or paster plugins to draw.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably the easiest is to have a lot of variables as follows. Pos is a value from 0 to 1 that when used with lerp can give an angle between the start and end angles.

    variable start_angle

    variable end_angle

    variable pos

    every tick

    --> add dt to pos

    pos>1

    ---> set pos to 1

    every tick

    ---> set angle to anglelerp(start_angle, end_angle, pos)

    Start of layout

    ---> set start_angle to 0

    ---> set end_angle to 90

    ---> set pos to 0

    That's the long version. You can simplify it but it becomes less readable.

    The "start of layout" condition is an example how to use it. You need to set the start and end angles and reset pos to 0.

    Also the transition will take one second. You can make it faster or slower by adding another value to "pos".

    Ex.

    2*dt for 0.5 seconds

    0.5*dt for 2 seconds

    0.1*dt for 10 seconds

    Finally it's a linear angle change, although you can make it ease in-out by changing:

    anglelerp(start_angle, end_angle, pos)

    to

    anglelerp(start_angle, end_angle, cubic(0,0,1,1,pos))