Skip to main content
GameDev.net gamedev.net
🔒 Locked

Starting a Map Engine

Started by kelcharge Dec 23, 2004 at 10:58 PM 0 replies 250+ views
Original Post
kelcharge
kelcharge
Ok when making a game it is kind of hard to make a game without collisions for that character to run into. The best way to probably do this would be to start a map engine that would split the screen into 16x16 tiles. I was wondering if anyone had any suggestions as to how I would go about doing this?
True God of the TribunalKelchargeMy SiteMy Ugly Forums
Ravuya
Ravuya
Store an array of integers, each one corresponding to a different type of tile, and then draw it starting at an (x,y) offset (your scroll). Draw the player somewhere in here, based on the offset.

When the player moves left off the side of the screen, decrement the x offset. Same for when he moves right off the side of the screen, except incrementing it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.