R0J0hound's Forum Posts

  • No, I don’t believe so. Not with the features exposed to the event system as I recall. AA can be disabled on html5 canvas elements from JavaScript with a variable that differs with different browsers. I’m not going to touch that though. It requires modifying the plugin.

  • That's a pretty cool result. The issue is caused by the texture packing, it throws off the uv's. I never found a solution. It's just one of those things I considered broken and never touched.

    You can avoid the texture packing by manually loading the animation frames from events. Basically put all the images into the "files" folder in the project bar. Then at the start of that layout set the animation frame and use the load animation frame action to load the image file. Maybe use smaller dummy images initially. It's an idea at least.

  • You’re making an assumption with how it’s implimented. It’s probably trivial to convert, but I don’t find it worthwhile to do so.

  • There isn’t anything I can help with. I only use c2 and am unfamiliar with making c3 plugins.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You’d get better performance with a tilemap instead of multiple sprites. There are a few examples on the forum you can find with search.

  • If you make the river area a solid color you can then use a blend mode to put a tiled background within it.

    So create a new layer. Set force own texture to true. Place a sprite for the shape of the river. Put a tiled background on top and set its blend mode to destination in.

    I guess for the shore lines you’d do an additional layer or something.

    You could also create the river with multiple sprites or you could draw a big polygon with the canvas plugin.

  • I've done it with an array. That zorder action wont really work here. Say you have an instance variable "z" for both sprite and tiledbg.

    Every tick

    -- array: set size to (0, 2, 1)

    for each sprite

    -- array: push sprite.z to front x

    -- array: set at (0,1) to sprite.uid

    for each tiledbg

    -- array: push tiledbg.z to front x

    -- array: set at (0,1) to tiledbg.uid

    every tick

    -- array: sort x

    array: for each x

    -- sprite: pick by uid array.at(array.curx,1)

    ----- sprite: send to front

    -- tiledbg: pick by uid array.at(array.curx,1)

    ----- tiledbg: send to front

  • Plugins seem like an overkill for something like this.

  • It’s been ages since I derived that formula so I don’t know other than it is related to the ball size.

    Basically place the balls down manually, then calculate the y difference between two rows. It actually would come out to 16*sqrt(3) which is about 27.6 but I just rounded to 28 to be able to snap to integer positions.

    I calculated it by placing two balls on one row and one ball between them on the next. Draw a triangle between the centers. Each side is 32. Cut the triangle in half. The horizontal side is 16, the diagonal side is 32 and we can calculate the vertical side with the Pythagorean theorem. a^2+b^2=c^2 where a=16, c=32 and just solve for b

  • link updated

  • Exactly like that? Looks like a quad mesh around the island. Then the uvs are lerped to give the motion. Probably this is done twice to get two different waves.

    Instead of messing with the uvs you probably could move the corners of the quads instead but that would require more math.

    Realistically this is not something that Construct gives you the tools to do. In construct2 there is the paster and customDraw third party plugins that have a way to draw distorted quads like that, but it's fairly low level. Construct 3 at this point only has the funky quad third party plugin, but it doesn't let you mess with the uvs as far as I know.

    Another approach that you may be able to get to work well enough with some artistic finesse is to just place a bunch of wave sprites around the shoreline and move them forward toward shore. Here's a rough example of that:

    dropbox.com/s/o7zlw6lewt9kjqt/wave_wip1.capx

  • So you want:

    * moving, scaling and rotating via handles.

    * for multiple objects at once.

    * undo/redo stack

    * variables per object. Construct variables or your own?

    * constraints on position, angle, rotation.

    * conditions when editing is being done and such.

    An example could be made but it would be specific to that example. It's not simple to adapt it to an existing game. There are lots of things that need to tie in. A plugin would just add more complexity in a different area.

    There are a few examples around the forum of parts of what you're after.

    construct.net/en/forum/construct-2/how-do-i-18/resize-handles-example-48892

    construct.net/en/forum/construct-2/how-do-i-18/how-do-i-scale-multiple-sprite-140330

    construct.net/en/forum/construct-2/how-do-i-18/how-t-rotate-a-sprite-using-x-133067

    construct.net/en/forum/construct-2/how-do-i-18/how-do-i-rotate-sprite-then-se-85784

  • I mean you could do an expression like:

    Set var to int(time*30)

    To get one to be added 30 times in a second. Then it would be just integers.

    In general the expression would be

    int((time-starttime)*rate)

    Do you want something to happen every time the car changes by one? I don’t think I follow why you’d need >=. I mean you could do something like the following to do something every time it changes by 1. Depending on what you want to happen you may have to do some interpolation if say you wanted to shoot bullets and they need to be spaced correctly.

    Global number prevVar=0

    Global number var=0

    Every tick

    — set prevVar to var

    — set var to int(time*30)

    Repeat var-prevVar times

    — do something

  • I’d just add n*dt and int() the value every time you access it.

    I guess if you don’t need to access the variable very often you could just do this right before you access the value:

    Global number starttime=0

    Some condition

    — add (time-starttime)*dt to variable

    — set starttime to time

    — do something with the variable

    I doubt either would be noticeably faster.