map scrolling trouble...

Started by
1 comment, last by neonstar 22 years, 3 months ago
howdy folks, i''m currently writing a sidescrolling action game, and i''m having some odd troubles with keeping my characters level on the ground while the screen scrolls. i guess is should give you a bit of background. i wrote my map engine about a year ago, and i added a lot of advanced features to it. infinite layers, alpha depths, colored lighting, parallax scrolling, things such as that. since there are an unknown amount of layers and each layer will have a different parallax level, i had to give the map system a set of local scrolling functions. calling this would scroll the whole map for the desired amount and calculate any parallax and such. now that i have all that set up, i''m trying to use it in my game, and it''s all working well except for one pretty large problem: my characters won''t stand level on the ground if the map is scrolling up. the amount that the map scrolls is based on the delta of player movement since the last frame. the scrolling works fine for each other direction, but when the map scrolls up, it makes the ground work funny. the characters'' standing on the ground is determined by whether they are on top of or inside a walkable map tile at that point in the game loop. if they are inside of the map tile that is walkable, their position is recalculated so they are standing directly on top of the tile. when the map scrolls, it fucks up this calculation somehow, and the enemies that are standing give me a funky bouncing effect. the player doesn''t land right sometimes. when the map gets high enough that it doesn''t have to scroll up anymore, the effect goes away. disabling upward scrolling based on player movement makes the effect go away as well. i haven''t noticed any problem with downward scrolling, so something has to be going wrong to make it act like this. i know my description is really vague, but i''m just seeing if anyone understands or has had this problem before and can point me in the right direction. i''ve tried basically everything i know how to do. thanks, dave -- david@neonstar.net neonstar entertainment
--david@neonstar.netneonstar entertainment
Advertisement
nevermind, i fixed it.

thanks, posit.

dave

--
david@neonstar.net
neonstar entertainment
--david@neonstar.netneonstar entertainment
Come on! at least tell us how you fixed it!

This topic is closed to new replies.

Advertisement