Zebbi's Recent Forum Activity

  • Zebbi,

    Thanks for buying it! The P2 plugin has a wall hang only so anything additional that you do via events will be good! If the player is moving at int positions then it's not P2 - my plugin works to 1/8 pixel iirc (I'll check).

    Jump height is different because the standard plugin doesn't use Newton's equations of motion, only an approximation, which means that different frame rates will give different jump heights.... But this is not a problem with P2 :)

    That and a completely different collision system (including filtering) are the main differences.

    There shouldn't be any latency compared to the standard plugin. I'm intrigued by what you could mean for that.

    Cheers!

    Yeah, as we worked out, it's because platform+ registers the input during pause, whereas platform2 doesn't. I've tried matching the jump heights and jump speeds, but it's quite tricky to get a frame accurate match, specifically because I can can't change the timescale without it screwing up platform+'s height scale (which platform2 THANKFULLY fixes!) so step incrementing is the only real option for side-by-side testing. I assume incrasing gravity will increase the jump acceleration speed, which is the hardest part to match between the two, specifically the initial launch speed of the jump, and platform2 always seems a little slower to launch the jump. I'm not sure how to take Newton's laws:

    v * v = u * u + 2 * a * s

    = (v * v - u * u) / (2 * a)

    is distance traveled which, in this case, is jump height; so jump height = jump strength squared >divided by 2 x gravity

    ccording to Newton(edited)

    o, double the jump speed = you jump 4 times the height (due to velocity squared)

    and apply that to my platform+ settings to get the closest possible match I can. The reason I need it exact is for porting a couple of game engines already designed with previous platform settings, and also so I can finish writing a walljump group of events that accurately matches platform+ (which is tough to do by comparison without the rest of the speeds matched).

  • Please start a new thread if you want to discuss the standard platform behaviour and its problems (which are caused by the runtime PushOutSolid function).

    Platform 2 has a completely different approach to collision management, which is why it doesn't suffer from the same problems that the standard behaviour has.

    Colludium Thanks, I just wanted clarification this plugin doesn't have such issues. Bought Platform2 yesterday and I'm rewriting the walljump function from Platformer+ (based exactly on standard platform code, with walljump added) and have a couple of questions.

    1. What's the best way of providing a wall-jump and slide? I have my own method which is working well: s15.postimg.cc/gopjevzdn/walljump.png

    The only issue is with this, the player seems to move at int positions, rather than smoothly on subpixels. Is there a better way you could suggest implementing wallsiding/jump that would be smooth? (Not sure how buggy this way of doing it might be, I haven't road tested it extensively yet)

    2. Matching standard platform movement accel/decell and speed seems perfect, but jump height seems a lot different. This was what I used for Platformer+ : s15.postimg.cc/635o2iqdn/platpls.png

    This is an approximation that I used (still working on a perfect match): s15.postimg.cc/ihsg2vs6j/plat2.png

    Do you know what differences Platform2 and standard platformer would have in relation to jump strength?

    3. I'm aware there's a 1 frame latency on this to the standard engine (which makes it tricky to match speeds and jumps), I'm interested in what exactly causes this, and if there's any way to bring performance in line with the standard? (probably not!)

    Thanks!

  • Thank you dop2000 , that worked perfectly!

  • I have an array with 2 rows, one for an animation name, and the second row for a paired variable. When a particular object is destroyed, I have it write the two values from the object to the array:

    s15.postimg.cc/5d8n1ya0b/flish1.png

    I'm trying to then delete the element if I'm overlapping a different object that matches the second rows value. I've tried a few ways:

    s15.postimg.cc/ivfjdq6kr/unknown.png

    s15.postimg.cc/ivfjdq6kr/unknown.png

    s15.postimg.cc/ivfjdqtq3/unknown_1.png

    s15.postimg.cc/9avwqvjtn/unknown_4.png

    Basically, I want this:

    s15.postimg.cc/cuhugphej/unknown_2.png

    to become this:

    s15.postimg.cc/n4k9fz9uz/unknown_3.png

    Any ideas how I can get this element deleted?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahh thanks, I was curious which your clip was taken from.

  • >

    > > Ok, could we create a bug / notice about this?

    > >

    >

    > I'm not sure why I would want a limitation/bug in a standard plugin fixed if it's providing my plugin with a selling point...

    >

    If Scirra solves this, one thing will happen:

    We will all benefit from it.

    It can also happen that you get rid of this problem and focus on other features of the plugin.

    But that's up to you.

    Anyway, I opened an error report.

    Is this push out bug happening with platform2? It seems like platform2 was created to fix these types of issues, is that example from built-in platform?

  • Will save/load integration be ready for 1.0? Looks awesome so far!

  • Colludium just bought your plugin, it's amazing! I've been using the aging Platform+ behavior construct.net/forum/extending-construct-2/addons-29/behavior-platform-an-enhanced-58740 which is a mod of the built-in platform behavior. It handles wall-sliding for me, so if the player hangs off the wall, they slide down slowly if they press against the wall and drop if they release. Is this functionality built into Platform2? I'm hoping it can be an almost straight switch over to Platform2 without having to worry about using any of my clumsy events to handle these things!

  • Has the built-in platform object been updated at all since this was released? I know bugs have been fixed to the collision system, but does that include the actual platform object?

  • Gigatron is this the most recent version of the FLODJS player that supports tempo changes? I believe you sent me a version a year or two ago that was bleeding edge via PM, is this the same version?

  • You can do it without behaviors. Just give the object an x and y velocity and do the bouncing by checking if walls are going to be hit horizontally or vertically. If they are, then reverse the velocity.

    > Globals:
    G=100
    
    Instance variables:
    Vx=0
    Vy=0
    
    Every tick
    — sprite: add g*dt to vy
    
    Sprite: overlaps wall at offset (self.vx*dt, 0)
    — sprite: set vx to -self.vx
    
    Sprite: overlaps wall at offset (0, self.vy*dt)
    — sprite: set vy to -self.vy
    
    Every tick
    — sprite: set x to self.x+self.vx*dt
    — sprite: set y to self.y+self.vy*dt
    

    Just set vx and vy when the player throws it. You can adjust g to taste.

    Should be pretty close. At the very least you’ll get the perfect bounces. There are improvements that could be had. Here are a few of them that may be of interest:

    Possible improvements:

    The sprite needs to be outside of walls when it starts and throughout the motion. If it’s in a tight area, or it’s started inside a wall, then you need to move it out of the wall first.

    Usually not an issue if created inside the players collision area, and it’s given enough room to move around.

    There can be energy loss with vertical bouncing at times. The sprite will bounce lower after a few bounces.

    One reason for this is variable dt. You can help correct this by replacing self.vy*dt in all expressions with self.vy*dt+0.5*g*dt*dt.

    Bouncing is done by checking where the ball will be a frame later. You can get more precise bounces by calculating when the wall is hit exactly before bouncing then moving again with the remaining time. Not really necessary but has advantages for very fast sprites.

    A final idea is to only use integers for position and speed, and always use a fixed dt. This complicates it a bit but it removes energy loss from rounding caused by floating point numbers.

    Thanks so much R0J0hound I really appreciate it, looks awesome! So G is speed, and setting Vx and Vy at spawn time sort of controls how high and far they are thrown?

    Bouncing is done by checking where the ball will be a frame later. You can get more precise bounces by calculating when the wall is hit exactly before bouncing then moving again with the remaining time. Not really necessary but has advantages for very fast sprites.

    I'm not exactly sure how this could be done, although Jill's blade moves fairly slowly, I'm interested in what method could be used.

    A final idea is to only use integers for position and speed, and always use a fixed dt. This complicates it a bit but it removes energy loss from rounding caused by floating point numbers.

    Should I encapsulate all variables in int() to achieve this? And how is dt made to be fixed (presumably so it's not machine independent?

  • Here is a way to do it without behaviors:

    http://dl.dropbox.com/u/5426011/examples13/45bounce.capx

    Could this bounce ball example be reposted please?

Zebbi's avatar

Zebbi

Member since 20 Jan, 2014

None one is following Zebbi yet!

Connect with Zebbi

Trophy Case

  • 10-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies