Skip to main content
gamedev.net
🔒 Locked

2D Level Framework

Started by zeig zeon Oct 29, 2004 at 10:05 PM 1 replies 700+ views
Original Post
zeig zeon
zeig zeon
For some reason, I've decided to revisit my attempt to make a plausible level framework. Unfortunately, I don't know all of the most advanced architectures for storing the graphics aspect of a game level. This is what I have come up with so far; please tell me if I'm kinda heading in the right direction or if there is a better way: What I've come up with is a multi-layered design with a rudamentary z-buffer. My idea was to have a linked list of all the images that can be iterated through and each drawn in order. Associated with each link would be an integer specifying the link's z-depth. Also associated with the first link on a depth plane would be a connection to the first link in the next depth plane. Kinda like a linked list with a second linked list intertwined within it. If this is totally confusing, I'll try to get some code up this weekend, but I have work, and will be tied up most of the time.
Zakwayda
Zakwayda
Hm, so what are you talking about exactly? Are you talking about a 2d level with 'layers', i.e. some things are drawn in front of others? If so, your solution as I understand it sounds reasonable. Basically, associate each image with a particular 'plane', then sort by plane and render from back to front.

But perhaps there's more to what you're asking. If so, perhaps you could clarify a little.
zeig zeon
zeig zeon
Nope, that's what exactly what I was asking. I just wanted to make sure I wasn't way off base before I threw a couple hundred lines of code into the endavour.

Topic Locked

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

Sign in to reply to this topic.