• Advertisement
  • entries
  • comments
  • views

SideScrolling glory

Sign in to follow this  


After about 3 hours of frustration due to an idiotic mistake (I was making the wrong value bigger[headshake]) I finally got horizontal and vertical scrolling working. I had to remove all of the map code due to my faulty scrolling in the vertical-scroller demo and I have part of it reimplemented. Anyway, here's a screenshot (filler-art from Ari Feldman's SpriteLib):

The red number is the number of visible tiles while the pair of numbers in the titlebar is the position of the mouse in the map (which, for some reason, I have updated via WM_MOUSEMOVE instead of WM_INPUT.)

For some reason I decided to implement fixed size maps (each map is 125x125 tiles at the moment) which I need to remove and make it per-map data file based.

I don't know how much I'll be getting done tomorrow since I have to work in the morning and I'm going to an employment group (for sure this time) and then I might crash at the apartment I'm supposed to be moving into. Even if I do make it home, it's time I clean up all of the dirty dishes in my room which will take a while lol.

Well, it's definitely bedtime for me, I've slipped into 'filler-code' mode. I just set up the camera system and instead of using my readily available screen values, I hard-coded 640x480 and said to myself "I'll fix it later." For shame[headshake].

Edit: Tip for 2D tile-based game designers: Always, ALWAYS, setup tile rendering via a rectangle and not screen coordinates. With my current setup I could attach my rectangle to a widget and render to that and it would move/resize with the widget.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement