[SOLVED]: Retro pixel-quantized platform engine using loops

  • 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

  • Yes it's true, that error margin does matter. Sorry, I wrote back before testing!

    [quote:qd88t66j]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

    It's true, though what I meant is that when you design a platformer, you don't absolutely have to make the character the exact size of one of your tilemap's cell. So I doubt that Ashley will add a unique behavior for this specific kind of game.

  • 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

  • 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

    I solved it in my game by adding in an event that checks if the player is overlapping the tilemap at two offsets (left and right) and is not on the floor, if this proves true then the player falls down. I saw something very similar in your .capx but it used a separate sprite object.

    I swear to god though, I was looking at your thread last night

    IMHO R0J0hound should take a look at the Platformer behaviour and just eliminate the lines that contain slope detect and save it a "Retro Platformer", as it would solve the problem completely.

    You should make a Behaviour similar to Platformer that eliminates the slope detection.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • christina do you still have the file? seems like Dropbox deleted it

  • Fabian Luarte yes of course:

    here:

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

    I also updated the link on the first page.

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)