Lode Runner (Dennis's Worklog)

A Remake in Bennu RSS Feed

Map editor.

MAP EDITOR:

I have to think on a way to use scrollable maps. (Now I simply use the "put" command on screen) and a way to save them. I had 2 methods in mind. At first I was thinking about using XML:

XML code:
<map>
  <tile>
    <grid>
       <x>1</x>
       <y>1</y>
    </grid>
    <graphic>101</graphic>
  </tile>
</map>


Another method I have in mind is just to store binary.

Then tiles are stored like a large string in a .dat file:

"x1y1g101x2y1g101x3y1g101...."

I only need to store the coordinates and the graphic code.

What do you choose for? I'm not too sure about XML functionality in Bennu, and I have some experience with fopen handlers and shit, so I might go for the 2nd.

I'll post screens if asked for.

I also need people to make maps :P
(Posted on May, 25th 2009, 10:56)

Comments


Htbaa said:
I think XML will generate too much overhead for a case like this.
(Posted on May, 25th 2009, 18:04)


DTM said:
and surely the only reason for xml is if you want to edit it by hand?
(Posted on May, 25th 2009, 22:21)


Fiona said:
You should -not- use XML if the goal is to make it hand-editable. It's possibly the most horrible text-based format for human editing. Anyone who thinks it's "good" for that reason has never had to do it.
(Posted on May, 26th 2009, 12:13)


Eckolin said:
If you want it to be editable, just save the size of the level and a rectangle with a character per tile.
(Posted on May, 26th 2009, 19:23)


DTM said:
so what's a better text based format hmm?
(Posted on May, 27th 2009, 00:14)


Fiona said:
INI, JSON, YAML are three standardised formats that are much better. Your own proprietary format (like Ecko suggests) can usually do the job better than all of those though since it would be domain specific.
(Posted on May, 27th 2009, 10:32)


Htbaa said:
YAML is horrible...
(Posted on May, 29th 2009, 21:59)


Fiona said:
Worse than XML? I think not.
(Posted on June, 1st 2009, 16:19)


Htbaa said:
They're equally worse! YAML is just horrible with its indentation strictness. But since you're a Python coder I suppose you don't mind it at all :-)
(Posted on June, 1st 2009, 18:30)


Fiona said:
I like it quite a lot. :) It's within my urm.. "comfort zone" hehe...
(Posted on June, 1st 2009, 22:23)


Dennis said:
Put XML and YAML in the freezer! I have my own system now, I call it PWN.
(Posted on June, 5th 2009, 15:18)

Post New Comment

You must log in or register to post comments.

Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!