PDA

View Full Version : scrolling



kevkevg
October 23rd, 2007, 02:00
in lua I need help with a scrolling screen. I cant figure out how to make a scrolling view just like mario. I wanted to use this in alot of my games but could not figure out how. please help me out

dangee
October 23rd, 2007, 02:27
suggest you start off with a 512×512 Image,
and use the Analog stick to control which subsection of the image
you blit to the screen for each new frame.

kevkevg
October 23rd, 2007, 02:39
wait so your saying to have a very large image of the entire map and then only show the part we need to. I'm guessing that would work unless I use a really really big image?

dangee
October 23rd, 2007, 09:21
thats the crudest implementation of the concept.
As you suspect, this isnt an ultimate solution,
coz Lua, & RAM impose image size limits.
So as a 2nd step , consider 2 images side by side,
each 470×272 (yes, 470 , not 480).
for X scrolling, you need to blit a subsection from
each of the 2 images to make the full screen background.