Smooth scrolling 2D tile

Started by
3 comments, last by nick5454 14 years, 8 months ago
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
Advertisement
It's probably much easier to use glTranslatef.
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.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

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
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

This topic is closed to new replies.

Advertisement