Jump to content
  • Advertisement
Sign in to follow this  
nick5454

OpenGL Smooth scrolling 2D tile

This topic is 3265 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am curious what the correct way to smooth scroll. I'm thinking to adjust the quad coords and move the texture coords also for the location offset. Is thiscorrect? I'm using OpenGL es on iPhone. Thanks, Nick

Share this post


Link to post
Share on other sites
Advertisement
I would have thought you would move the vertices OR the texture coordinates but not both. As for smoothing it Ig uess you will have to give it a speed and update it with time elapsed

position += velocity*timeSinceLastUpdate;

That way even if the updates are inconsistant it won't look too jerky.

Share this post


Link to post
Share on other sites
Yeah the time rate will be important.

I originally thought I just would make the view slightly smaller and I could draw the map with offsets.

Someone told me no that wouldn't work. I do remember shrinking the view in my dos/c64 days, so i didn't have to manage partial tile rendering.

I tried drawing larger than the iPhone screen a few weeks ago and it messed the drawing up completely.

We'll see

Share this post


Link to post
Share on other sites
o this is a tile map maze(2d) for the ground.

so I have to shift the tiles at increments, where as the locations pretty much stay in the same place. ( i.e.. Ultima 3 RPG )

That may be confusing not stating that. sorries

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!