R0J0hound's Forum Posts

  • Probably with the Ajax object.

    Do a google search for "ajax get server time" for a good starting point of how it's done. Mostly JavaScript examples, but somewhere in it is the answer.

  • moving the for each above the overlaping condition probably would fix that.

  • If you use the system action "set minimum framerate to 60" then the jump height will be exactly consistent at the expense of going in slow motion on weaker machines that can't run at 60fps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's probably best to have a separate object that you set the angle of instead of setting the angle of the physics object.

  • I'm not aware of any others besides the collision pairs loop i think.

  • That's a fun result:

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

    Multiple circles aren't very considerate sometimes though.

  • Prominent

    That's odd, but I don't think i'll be able to fix it. It appears to be a bug with the library itself.

    When those triggers are called the simulation is in a locked state where only certain things are allowed to happen. To make it work the library delays certain things from being done until the simulation is no longer in a locked state. Also on top of that i've added stuff on top of that. The result is too many cases where things can fail.

    The bug here is with waking up sleeping objects when the library is in a locked state.

    I guess the workaround for this particular case is to either disable sleeping, or keep those objects awake with a "every tick: wake sprite" event.

  • I think by "memory management" it means faster things than garbage collection can be used. Aka less small pauses.

    Actually, it's very similar to asm.js and probably has similar performance characteristics. The main draw over asm.js is the code will be more compact in size, but I'd have to see an example to see by what margin.

    If parts of the engine were re-written to use it I'd imagine it would mainly be the bottleneck areas. I doubt the interface used would change as that would break existing plugins. Also it's just a feature available to the browser so plugins/behaviors can even be made to use it now if the browser supports it. The same can be said for asm.js currently.

  • Prominent

    Assuming the circle can be rotated in 3d you can then think of it as a plane. This link has some useful equations:

    http://paulbourke.net/geometry/pointlineplane/

    Edit:

    1. Just find the intersections between the circle plane and the edges of the polygon. If none intersect it doesn't collide.

    2. With the intersections check their distance from the center to see if they they're within the radius. If any do, it's a collision and you're done.

    3. if none of the intersections are within the radius, and you have two intersections you then find the closest point from the line between the intersections and the center.

  • C3 is an editor re-write and supposedly will make plugins able to have more deluxe editor capabilities. So if that's true even if this isn't officially added, a third party plugin could be made to do it.

    A current idea you could use is to make an in game editor to add the collision maps. Here's a quick mock up:

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

    There's the initial work of creating the editor mode but afterwards it makes it much quicker than manually positioning lines like that with sprites. Not to mention that you can extend it in any way you need.

  • That's the value in the two fx files. It's the red, green, blue, and alpha amount. All in the range of 0.0 to 1.0.

  • To just change the color used for solid replace the

    vec4(1.0,1.0,1.0,1.0) with any other color.

    The second idea to let multiple colors be solid is unsolved.

  • You can modify the effects to make a different color be immovable. To use any color for solid it would require more creativity with the effect to somehow encode color and whether it's sand or solid in each pixel.

    There isn't a "trail" when I run it so I don't see what is to be removed.

    Also if you search the forum for "falling sand" you should find some examples using an array.

  • tunepunk

    This roughly follows that, except it jitters left and right instead of moving diagonally. Being done in a shader we can't actually move pixels. We can only change them. To do this it detects patterns and changes pixels.

    Doing it with an array can also be done. It looks good but does not scale like the shader can.

    Anyways it may be possible to do diagonal motion instead of horizontal.

    Thelegendvinny

    White doesn't fall which explains why much of the init graphic doesn't fall.

    Things move a pixel at a time so to make it spread faster pixels either need to move further every step or the effect needs to be applied multiple times. You can add a repeat condition to the second event to do the latter.

    I don't understand the second question.

    Allenr

    To fall it spreads out vertically first, which makes it look to fall slow. I see no solution to this if done from an effect, and the web seems to lack examples to this except for one on shader toy. However I lost interest in analyzing how it works and mapping it to what we can do with effects in C2.

    Also I found a way to test it. If I couldn't do that it would be broken in many ways.

  • If it runs and nothing is animated then my only guess is webgl isn't being used. Do other effects work for you?

    If not then your graphics card is probably blacklisted on your browser and you'll need some solution without effects.