R0J0hound's Forum Posts

  • I don't use effects but as far as I know the only issue with the outline effect was being thicker on export but that was corrected in C2's renderer a few releases ago.

    Now the paster object doen't behave the same way as C2's renderer when using effects, so results will be different in a lot of cases. So yeah, it's a bug in the paster plugin but I probably won't get around to fixing it.

  • You can't with the forum software. Here is what's supported:

  • You could use the canvas object to get the pixel colors.

  • It may be a limit with the asmjs version of box2djs. You could try changing to box2dweb instead from the project properties and see if that's the case or not.

    Otherwise, you could file a bug. I don't think most people use objects with so many points, mainly from the over 8 point warning I guess.

  • Here's my example. It plays back perfectly every time with chrome and probably nwjs.

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

    Looking at yours the only difference that may need investigating more is the save/load state. Maybe there's a delay or something.

  • Oh ok, I'll look at your capx later when I get the chance.

    An idea just came to mind. Since setting the minimum framerate to 120 or higher will make dt be a constant 1/120, you could set the time scale to 2 to get a constant dt of 1/60 so that it wouldn't be half speed.

  • I don't have Web access on my computer currently so maybe I'll be able to send it tomorrow.

    I did some more testing with it. I recorded for 27 seconds and observed the final location. It varied maybe a thousandth of a pixel so it's not exact, and I can see how it can get further off as the recording gets longer. Dt does indeed vary slightly because the time between frames varies a little, and the the minimum frame rate is only used if dt is greater than it.

    So instead I tried a framerate limit slightly higher than 60 like 64.

    On chrome it worked well in giving me a constant dt and after a 37 second recording the end position was exact every time.

    Edge didn't work so well with that. I was still getting a different dt occationally which made the end position off by around a pixel after 37 seconds. I tried 9999 but looking at dt it seems 1/120 is the minimum dt on my machine for chrome and edge.

    But that also made my game run at half speed. Does your game run at the same speed?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any reason you set the minimum framerate to 99999 instead of 60?

    I did a test and didn't set the minimum framerate and recorded the input. I was at a consistent 60 fps so that was good. Playing back was spot on, I did some stuff to create lag and the replay was failing. I set the minimum framerate to 60 and the replay looked perfect again. However if I set the minimum framerate to 99999 instead of 60 the replay failed badly. My guess is something non-intuitive is occurring with such a high value.

  • I wonder if that limit is enforced if you change the layout size with an event.

  • True. You need to change the Ray for the second iteration. Probably a "for each laser" instead of the repeat so that each Ray could be used.

    As a rough overview it's kind of like this:

    For each laser

    ---"set Ray" to laser

    --- for each wall

    ------ "cast to" wall

  • Ken95

    I won't have time to look at your capx, but if it's only working for one laser then you need to repeat the actions for the other lasers. A loop would be useful.

  • That's more than I'm willing to help with. The library I used can't load excel files, but it's the only one I found that can add images.

    Anyways I guess a way to do it would be to take the xml file, do your replacements, then use the xml plugin to access all the data in it. Finally it's a matter of transferring it all over to a format the excel js library can use to create the file. At a glance it should support all the features you need but maybe not. It'll be a lot of digging to get it working either way.

  • For the first you can use x.pickedcount.

    For the second if it's tile based i'd use and 2d array for the grid and use a "for each sprite" to add each sprite to the array and if a spot is already occupied just delete the lower one.

    Or you could finagle picking to do it. A condition like "sprite is overlapping sprite" will pick all the sprites overlapping but that isn't what you want, and putting that after a "for each sprite" won't work cause then it would only check for collision with itself because only one instance would be picked.

    The simplest way would be to make two families of the same object types (or only one family if only one type is needed). Then do an event like this:

    for each family1

    family1 is overlapping family2

    pick top family2

    --- family1.zorder > family2.zorder

    ------ destroy familly1

    --- else

    ------ destroy family2

  • There's a "resize canvas" action, that sets the texture size used by the canvas. By default it uses the size on the layout but for high quality scaling you'll want the texture size to be bigger. So for a canvas covering the viewport you'd want the texture size to be (windowwidth, windowheight) for example. Keep in mind that that action to change the canvas size will lose what was previously drawn.

  • To be clear the physics behavior issue and chipmunk behavior issue are two independent issues.

    I can only speak for the chipmunk behavior though.

    A save/load will do nothing for the chipmunk behavior, and in fact I didn't make saving/loading do anything.

    The only way to "refresh" is to reload the webpage.

    I probably won't have time to track down where the leak is in the behavior.

    In the meantime a practical solution is to maybe diminish the amount of leaking so it can run longer.

    Creating less physics objects is an obvious thing to do, but it's probably not the issue here.

    Less obvious is every time a physics object changes size, or changes animation frame, or in the case of the tilemap is modified then that actually causes stuff to be recreated in the physics engine.

    So if you want an animated Sprite to have physics then instead pin the animated Sprite to another Sprite with physics.