Re: [Super-tux-devel] File format
Brought to you by:
wkendrick
From: Ingo R. <gr...@gm...> - 2004-02-19 18:39:29
|
ri...@ae... writes: > To implement tiles like the ones decribed in the development page, > I think we need to: > - create a config file with all the tiles and the information about > them; > - make tiles code flexible; Yep, tile-id to filename mapping and collision behaviour of a tile should be configurable via file and not hardcoded as it is now, would make it quite a bit easier to add new tiles. > My point is that we need a file format, since the level and > highscore ones should be more flexible and use a common system to > read them. > In my opinion, we don't need a very complex file format, so I vote > for a kde/windows (.ini) like file format. .ini is as far as I know pretty much unstructured (beside the group headings of course), its fine for simple name -> value mappings, but for a level format a little bit more structure is needed. I vote for .xml, s-expressions (aka lisp stuff) or something based on a scripting language we use (ie a python list or something like that). In Windstille my levels currently look kind of like this: (windstille-level (properties (name "Hello World")) (scripts "level_script.scm") (objects (igel (pos 10 20) (direction left))) (tilemap (width 10) (height 20) (data 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 8 8 8 8 8 8 8 8 8 8))) My biggest complains about the current format are basically that something like name=value looks a lot nicer then deriving the meaning of a value simply by its position and that there is a simple character to tile mapping, which limits the number of available tiles character pretty much (something like 80 when one wants to use just printable ASCII). It might not be a problem for the 0.1 release, but for later versions it will become problematic. Currently I have already 44 tiles and thats just one theme and without much background or variation in the tiles, so the final number will easily be ten times larger. -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |