
-----------------------------------
Martin
Thu Dec 30, 2004 12:31 pm

Megaman Map Storage
-----------------------------------
Right now, I'm working on a megaman-esque side scrolling adventure, and I was wondering if there was an efficient way to store the maps, and what textures these maps use. Things such as moving platforms and enemies are easy, since they can be included as extra information at the end of the file, but storing the actual map for a decently sized level is quite spacious.

Anyone have any suggestions?

-----------------------------------
wtd
Thu Dec 30, 2004 12:49 pm


-----------------------------------
A two dimensional array of structs (or equivalent) holding the data on each "square" is about as storage efficient as you can hope to get.

-----------------------------------
Tony
Thu Dec 30, 2004 1:12 pm


-----------------------------------
I suppose that if certain parts of the level can be generated rather than stored, that would save you some space :think:

-----------------------------------
wtd
Thu Dec 30, 2004 1:58 pm


-----------------------------------
I suppose that if certain parts of the level can be generated rather than stored, that would save you some space :think:

It's gonna eat more time and space figuring out how to make small optimizations than he'd save.  ;)

-----------------------------------
Martin
Thu Dec 30, 2004 4:47 pm


-----------------------------------
I made everything into objects, and it makes it a lot easier. Map size's still a bit big, but it's acceptable for now.

Thanks guys :)

-----------------------------------
Andy
Fri Dec 31, 2004 9:46 am


-----------------------------------
hmm why not have a decoder to interprete the maps and then use simple numberings to represent different objects and decode it into the correct files to load

-----------------------------------
Martin
Fri Dec 31, 2004 11:30 am


-----------------------------------
That's what it does do.

   

-----------------------------------
Andy
Fri Dec 31, 2004 11:51 am


-----------------------------------
yea i dunno.. thats the best way i can think of :?

-----------------------------------
thegoose
Fri Dec 31, 2004 5:15 pm


-----------------------------------
Use a tree, maybe? That way, if you have a bunch of stuff bundled together that's identical, they can become one node. Good thing about this is it takes logN time, almost instanteneous.
Or just hash everything...There should be some good cordinate hashes.
This way, it's very easy and quite fast to look into the part of the map that you are near.

-----------------------------------
Martin
Fri Dec 31, 2004 6:05 pm


-----------------------------------
Oh yeah, the objects are hashed.

It's looking quite reasonablely sized. Hopefully I'll have something to show off soon.
