Help - Search - Members - Calendar
Full Version: Horizontal/vertical Scrolling Game Help
GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment > GP2X > General talk [GP2X]
namco
Sorry if this is a little of topic but I'd like to make a scrolling shoot 'em up (like 1942) for the GP2X but I'm not sure how to implement the scrolling bit. Does anyone know any online tutorial that shows how to do this, either in SDL or DirectX (the DirectX would be useful for later windows game programming if I need it).

Thanks.
Pickle
QUOTE(namco @ Jul 20 2006, 01:05 PM) *

Sorry if this is a little of topic but I'd like to make a scrolling shoot 'em up (like 1942) for the GP2X but I'm not sure how to implement the scrolling bit. Does anyone know any online tutorial that shows how to do this, either in SDL or DirectX (the DirectX would be useful for later windows game programming if I need it).

Thanks.


http://lazyfooproductions.com/SDL_tutorial...n19/preview.php

To summarize waht happens, is you have one background, but as it moves say down the screen you draw it again at the top to fill in the gap. You do this right and it appears that it is one contigous background.

By the way SDL is complatible with windows
thebooboo
Full source for my very own scrolling shooter, Level Shmup, is available at http://www.timsrecordlabel.com in the games section if that's any help.

However, probably best to learn from Lazy Foo Productions, it is a rather excellent guide
Epicenter
Personally, I like to take one source image (Taller than 240 pixels..) and move an SDL_Rect in the size of the GP2X screen resolution (320x240) to pull the image data from and draw that Rect out to the screen.

Personally, I like to take one looping image and move an SDL_Rect in the size of the GP2X screen resolution (320x240) to pull the image data from and draw that Rect out to the screen. To actually scroll, I raise the y value or x value of the source SDL_Rect to change the source material .. and when it reaches its limit, reset it. If it doesn't need to loop, even easier.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.