Smooth scrolling 2D tile
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
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.
position += velocity*timeSinceLastUpdate;
That way even if the updates are inconsistant it won't look too jerky.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement