smoother movement

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

I've modified the mechanics of player movement somewhat.  Previously the game loop and player movement ran at essentially the same speed -- that is, about 6 frame/cycle.  This meant movement of 10 squares per second, give or take.

This ties, effectively, the player movement to the things on the board. Rocks fall at the same speed as the player moves down.  One square per game loop. That's fine - perfect - for BD. But it kind of "locks in" things. 

I'd previously impemented a "trick" to allow the player to smoothly move between squares - even though the actual movement was at 10Hz, the player sprite moves at 60Hz. I had a kind of "slide" variable in use which allowed smooth sprite movement even though in the background the player movement was clunky. This was never quite "right", and I hacked in various adjustments to get it looking OK.

Well, I went through and fixed all that up, so that the smooth movement was properly smooth. But along the way I got to playing with different movement speeds for the sprite -- for example, why does the player movement *have* to be at the same speed as the game loop. It doesn't really.

Also, if I move to a freeform player movement (jumping, climbing, etc) I most definitely want independent player movement and background object movement speeds.  So I did some tweaking to the player movement - and now you move slower than falling objects. Which makes sense to me - but comes as a bit of a shock at first, because if you're under something at the moment you cannot move down.  This is very different mechanics to BD and a bit jarring at first.

So be it; for now it's an intermediate phase bewteen current movement and to-come future movement.


In the binary, there are some time overflows now even in Gopher - I've updated to the latest version where @JetSetIlly has updated the timing a bit.  Time overflows are good, if it's closer to hardware.  Looks to me like I have a lot less processing time than expected, and I'll have to be quite clever in scheduling everything effectively.

That attached "_120K" version is for running on the DEV cart.  If using emulator, use the other version.