Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Side-Scroller Help

This topic is 5229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
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....


Phil P

[edited by - PhilVaz on April 22, 2004 7:07:50 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!