Problem with collision + zoom?!

This forum is currently in read-only mode.
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • And the real question is that really is a problem? If you change this box into some sprite gamers will hardly notice it.

  • Only just got round to looking at this thread - just to set the record straight here...

    You really really should use TimeDelta based movements - it's an important aspect of designing a game if you use custom movements! TimeDelta has limited accuracy and in practice will vary by a small, random amount every frame. This means sometimes, by chance, it will work, and other times it won't. You cannot guarantee you will land perfectly on top of the ground so you do need a little while loop to push you up out of the ground. And as for this:

    [quote:16vl06ng]usually I like to build the engine without the need to constantly push sprites out of backdrops they're not supposed to overlap.

    As you might realise, it's a perfectly necessary part of designing a good custom platform engine - in fact most movement engines (even the built in behavior ones) use some kind of push-out algorithm. So it's a bit like saying you're going to design a custom 360 degree movement engine without sin or cos. In other words, good luck with that

    In conclusion, I think the while loop solves this issue, no?

  • Even the NES Super Mario Brothers uses push-out code. Look up a website on SMB tricks and you'll realize just how far simple platform movement code has come.

  • So it's a bit like saying you're going to design a custom 360 degree movement engine without sin or cos. In other words, good luck with that

    thats actually very simple to do.

  • The problem is that the pushout won't work here, since Construct doesn't seem to recognize that the player sprite is overlaping. But it's displayed that way. So pushout has no effect, it's still (visually)overlaping 1px.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is that the pushout won't work here, since Construct doesn't seem to recognize that the player sprite is overlaping. But it's displayed that way. So pushout has no effect, it's still (visually)overlaping 1px.

    If you're really concerned about that one little pixel overlap, I recommend Doppel's suggestion. Change it to a sprite and actually play it a little bit. See if you even notice when you're playing as opposed to staring at it completely still and wishing it weren't there.

    When you make a final game, I assume you'll have real platform graphics overlaid on top of your collision masks, so just keep that in mind when building levels. One pixel of visual overlap is a bug... but it's not a game-breaking bug. You should still able to move forward with your project. I'm sure by the time it's ready to go either Ashley will have fixed the bug or you will have come up with a creative solution to bypass it.

  • The basics of my engine and some graphics, including the player sprite, were already done when I noticed the bug by accident.

    Of course it's much more obvious when you look at the little example I cooked up for this thread.

    You're right, it's not a gamebreaking bug or anything... would be very cool though if this was fixed in future versions.

    And thx to everybody contributing to this

  • If you made a collision mask for the platform that is 1 pixel bigger than the platform the player sees, wouldn't the sprite look like it's on the platform even though it is really inside of it? Since Construct doesn't seem to notice the problem, I don't think it would stop the player from being able to move. That would save the processing time of running a push out loop in the background I think

  • Oh yeah i made another reasearch and made this http://www.mediafire.com/?enak2tdx0lo well it works from 44~oo fps.

  • Great Doppel, this appears to work!

    But when I open your example it's set to fixed framerate of 44. With that setting it doesn't work for me. Needs to be changed to v-synced or unlimited frames and it does the job like a charm

    Thx man!

  • Great Doppel, this appears to work!

    But when I open your example it's set to fixed framerate of 44. With that setting it doesn't work for me. Needs to be changed to v-synced or unlimited frames and it does the job like a charm

    Thx man!

    Hmmm i guess it depends on machine then and/or refresh rate my is 75Hz... well if with v-sync works then its still useable , everyone should run it at v-sync and say if it twitches.

    Ps. For me in v-sync is not twitching.

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