christina's Forum Posts

  • You do not have permission to view this post

  • Well, even well-designed platformers with plenty of space between the gaps have this problem. A 10-pixel sprite clearing a 16-pixel gap is not minor, it's a big headache.

    Have a look:

    My engine removes guesswork, that's all. I'd be very happy if you could find a way to do the exact same without using loops. Please feel free to try

  • Valerien at such small sizes, where a character is 16x16px (or an even cooler 8x8), you absolutely can't rely on +/-0.5px

    Why would you call it framerate dependent? It clearly isn't, dt is taken into account during the loop. Check it yourself by making the timescale = 0

    I'm not ignoring C2's collision polys, I'm using them.

    Also, I'd like to see a movement with pixel rounding using the default platform behavior. Can you show me?

    All my experiments result in jerky movement

    By the way the main fix of this engine is the platform behavior's floor gap problem. There's hacky solutions to it, like spawning a wall in front of you, but they don't always work and have problems with corners.

    In this custom engine there's no code to make you "climb" back on a platform if you're already falling, and there is some code to make sure that you fall no matter how small the gap is, before drawing. And integer positions make sure that there won't be a +/- 0.5 pixels obstructing your fall

  • No problem Loops seem the only way to get C2 to do what we need for a proper retro engine.

    It's ready!! Please playtest it and tell me what you think. I added jump-through platforms, and everything is behaving great! Ashley a RetroPlatform behavior like this would really serve everyone who tries to work in low resolutions and doesn't need slope detection but does need super-tight retro platformer controls.

    CAPX

  • Fixed this by making the player's bounding box shorter and adding a head collider, so you can't jump and wiggle if you have a wall right above your head

    Here's the CAPX

  • Magistross :S hmm not with smaller xSpeed values. I may have to rethink this, damn

    BACLog sounds interesting! I'm not sure how to implement this in the engine's current form

  • Magistross When I grow up I want to be just as math-savvy as you

    Playtesting this, I see it doesn't play well with tight corners, damn.

    Here I'm trying to go left past the gap, but it won't let me. Any idea how to fix this?

    I mean it's pretty much done, and I could make the player 1 pixel shorter, but this is theoretical curiosity for me now.

  • When I grow up I want to be just as math-savvy as you

  • Magistross again, pure genius. Thank you! I couldn't see where to place that condition for the y axis.

    Ok, this is a pretty robust engine for games like Bubble Bobble, Rick Dangerous and the like. I'm calling it done.

    Valerien I tried with the custom movement. Try as I might, I can't get it to increment by integer amounts of pixels. It always has a floating point. Can you get it to behave? The only way I know how is to control XY position using loops.

  • Valerien I'm trying that right now Thank you!

  • EDIT: DONE! This is a working engine. Huge thanks to Magistross retrodude and newt

    [url=https://drive.google.com/file/d/0B6_Uw_-Ku5yISnlPNG9URXIxcVE/view?usp=sharing

    Features:

    * Always integer pixel positions

    * Always fall down when trying to cross a gap of equal width to the player, at any horizontal speed

    * Jumpthrough platforms

    * loop-based movement

    * framerate independent (takes dt into account)

    * controllable speed (no acceleration, on/off)

    * collision detection with walls

    _______________

    Original Post:

    So I revisited this ( https://www.scirra.com/forum/viewtopic.php?f=147&t=81757). It's a very old-school platform engine suitable for pixel games, that moves the player one pixel at a time using loops, always integer positions (unlike the built-in platform behavior). The player can fit inside gaps that are the same size as itself without horizontal or vertical wiggle room.

    One thing I haven't been able to fix is falling through gaps when moving. If player.horizontalSpeed is high enough, player never registers the gap under its feet.

    I could try to solve this by using R0J0hound 's solution https://www.scirra.com/forum/how-do-i-fall-between-blocks_t125214?&hilit=platform+gaps, since horizontal walls work flawlessly with this engine.

    However I wonder if it can be solved another way, since there's already a loop in place. Anyone?

    Here is the CAPX:

    CAPX

  • Thanks dcadjust, you can try this tutorial ( http://www.pixeljoint.com/forum/forum_p ... ?TID=11299 ). It taught me everything I know

    yes, do enter a jam, they are very fun!

  • Thanks everyone!

    R0J0hound you've saved my ass a thousand times <3 If you ever need pixels for a game, don't hesitate to tell me

  • I made this for LD32 in 3 days.

    http://ludumdare.com/compo/ludum-dare-32/?action=preview&uid=13139

    R0J0hound gets special thanks in the Ludum Dare text, because come on, he's an unsung hero.

    controls:

    * left and right arrows to move, X to jump

    * Z to cast freeze spell

    * when enemies are fully frozen, Down Arrow performs a Dash that knocks them over

    * then you can catch them

    * then you throw them at the portal by Z+X at the same time

    I also wrote a post-mortem here:

    http://ludumdare.com/compo/2015/04/22/461035/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It was fine if the rects were the size they were, but those weren't their 1:1 sizes, they were both resized at the time.

    At their 1:1 sizes, dividing the world width by 2.425 gives a spectacularly accurate result, so there may be a math error somewhere, but all the other numbers are so elegant that I don't mind