Advertisement

Side Scroller

Started by July 27, 2000 08:37 PM
1 comment, last by Lenny 24 years, 5 months ago
I am trying figure out how to set up a timer on a tile-based side scrolling game, to get smooth game play. I would appreciate any ideas and comments.
Usually you lock the fps, if you''re planning on doing something other than that you''ll want to look into some sort of pixel averageing so the screen can move less than 1 pixel at a time. If you do it this way you would figure out how many pixels per second you want the screen to move then multiply that by how many (hundredths/thousandths) seconds have passed scence the last frame.

I will note though, that the first method is used more often for 2d scrollers because of its ease and speed.

please explain better so we can answer better.

-mike



--------------------
What a cheap way to boost my rank huh? ;)
Advertisement

My suggestion would be to use total timed based (real-time?) for the movements of the players, enemies, and the camera. The best timer, IMO, is using the Windows QueryPerformanceCounter function after you set it up. Just multiply the delta time by the speed you want your object to move. I know that some very low end machines (probably running Win 3.0 or something) might not have support for it, but there''s different functions too. Anyways, either way you do it, it would work, so you can take your choice. If you want me to explain more, email me @ frag_daddy_@hotmail.com because I probably won''t see this thread later...


Mike Weber
shockonline.homestead.com/openglgameprogramming.html
-----------------------------1. "Diplomacy is the art of saying 'Nice doggie!'... till you can find a rock." 2. "Always remember you're unique, just like everyone else." 3. "If we don't succeed, we run the risk of failure."-Dan Quayle4. If life gives you sour grapes, squash them and make wine!

This topic is closed to new replies.

Advertisement