R0J0hound's Recent Forum Activity

  • It compares each two consecutive values so with repeat 50 the last value would be compared with nothing. You wouldn’t notice it unless there was water at the edge. I think it would just cause it to drain.

    On another note, I need to rework the algorithm. I’m modifying the array as I loop over it and that causes a bias. In the 1d version, water flows more to the left than right at first, but it’s visually tolerable when adding a low amount of water at a time. The 2d one is distractingly worse, water flows to the top left more than other directions. A fix is to not change anything till the end of the loop but there’s a bit more to it.

  • resdesign

    This is a plugin for Construct Classic, not Construct 2.

  • I had to give this a go too, even though dop's example is pretty cool. I found it helped to solve the problem first with 1d water:

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

    Then do 2d water later.

    https://www.dropbox.com/s/88haygg6tfvja ... .capx?dl=1

    Anyways, it's something you can play with and see if any of the ideas help.

  • mekonbekon

    I got a wild hair and tried an attempt. Only works if the object is onscreen because C2 doesn't draw off screen stuff. So the next step would to try something complicated to trick C2 to always draw in the cases we want. But that's ugly and hacky, plus that leads to an ever increasing number of side effects that would have to be handled. Baw I say, I like the event version better.

    roracle

    Those things are scrolling related, that's different than visually wrapping the layout from one side to the other.

    Ajbael

    The physics behavior doesn't work well when you set positions like that. I think the solution is what you're doing, except you need to wait till the next tick to restore the velocities. Anyways it's not something I want to re-figure out, instead you could use another physics behavior such as chipmunk, which works fine if you move objects like that.

  • An array is just a large amount of values. For a rewind just save the position of everything every tick. It doesn't make things slow.

    For example look here. It's basically just one action to record, and one action to rewind. Performance will be the same if you just started recording or have been playing for an hour.

    https://www.dropbox.com/s/9sgk5a2meazat ... .capx?dl=1

    Probably an array per object you want to rewind will do.

    It's based on this older example I made that makes a recording of every attempt.

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

    Now, if you can use lerp if you want to rewind slower than a frame at a time or want to account for variances in frame time. It's a bit more involved and probably isn't necessary.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A plugin probably could be made. The objective is to draw objects twice. So it could be done by replacing the draw function with two calls to the old draw function with two set positions in between. It’s not something I’m interested in doing.

  • 1)

    There probably are enough.

    2)

    Check the blog for the future plans. They also say they are doing well. Will C3 still be around in three years? Probably.

    You could learn JavaScript to make plugins.

    3)

    Pc’s are more powerful but it’s still possible to need to be concerned about performance.

    4)

    It’s dead simple. Why not try it?

  • How do you know you need that? Have you trie changing it to textarea intstead of text. That will let it be multiline

  • When you call the function you can pass the uid of an object as a parameter. Then in the function you can pick the sprite by uid.

    Start of layout

    Pick random sprite instance

    —- function: call “foo” (sprite.uid)

    On function “foo”

    Sprite: pick by uid function.param(0)

    —- do something with sprite

  • With unbounded scrolling on, make a duplicate of the tile map and put it right above the layout and another right below. The jump from moving the player from the top to bottom should be mostly undetectable. The wrap behavior is likely not sufficient so you’ll have to do:

    Player.y<0

    —-set y to self.y+layoutheight

    Player.y>layoutheight

    —- set y to self.y-layoutheight

    So basically you’re just duplicating everything to make it look seamless. You can probably get away with one deplicate instead of two if you position the duplicate depending if the player is close to the bottom or top. Moving objects can be trickier but the duplicate is always at the same offset from the original, a y difference of layoutheight.

    I’ve also used the paster object instead so that you draw the bottom part of the layout to it and move it above the layout when the player is near the top. The bottom is handled in the same way. Tile maps won’t work as is with paster because only the tiles onscreen will be drawn as an optimization. The trick to make it work is to move the paster and tile map objects onscreen first before drawing.

    Either of those will make it look like it’s seamless. Next thing to deal with is making stuff work across this seam. They’d have to be handled on a case by case basis.

  • That should be the case. Maybe post a screenshot of the event.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound