Side-Scroller Help

Started by
2 comments, last by AtmaStorm 19 years, 11 months ago
I am having trouble finding tutorials on constructing side scrollers. The book I''ve been reading throws just a couple lines of info at me, which pretty much tells me that a side scroller has a window that moves (duh). I need more than a few lines of text that says what a side scroller is. I need to know how to make one. Oh yeah, I use C++, so if you can find a tutorial that uses that language, that''ll be excellent. Thanks. "Eagles may soar, but weasels don''''t get sucked into jet engines."
"Eagles may soar, but weasels don''t get sucked into jet engines."
Advertisement
Here ya go, my side-scroller demo using DirectDraw 1.0

Works fine, still has a small bug when moving back to the left (the screen jumps). Basically, you have a couple variables to keep track: (1) which tile is your current (i.e. left-most) tile (xtile) that you are displaying on the screen, (2) which screen pixel you are offsetting that tile to (xoffset). This is for horizontal scrolling only, if you want to add vertical scrolling you'll need a ytile and yoffset also.

Study the Megaman source below. I got the idea how to do this from the www.makegames.com side-scroller online DOS book (the book is now out of date, but the scrolling concepts are the same)

Megaman4.cpp | EXE

I use ddutil.cpp and ddutil.h for the convenient DDLoadBitmap function to load each bmp megaman frame of animation, along with the 4 tile bmps, and use them in DirectDraw

When I get in the mood, I'll add new tile graphics, new animations, some platform spots to jump on, the level data, etc and turn into a full game....

VazGames.com

Phil P

[edited by - PhilVaz on April 22, 2004 7:07:50 PM]
http://www.2dgame-tutorial.com/
"How can they meet us face to face till we have faces?"-C.S. Lewis
You don''t need tutorials, just sit down and start thinking.

This topic is closed to new replies.

Advertisement