Re: [tuxracer-devel] Creating new levels (was: (no subject))
Status: Beta
Brought to you by:
jfpatry
From: Jules B. <jm...@he...> - 2000-03-31 11:43:23
|
On Fri, Mar 31, 2000 at 02:52:44AM -0600, Steve Baker wrote: > Jasmin Patry wrote: > I would use a separate text file containing something like: > > filename X Y Z Heading > > ...with the 'Y' component being optional to allow things to automatically > sit exactly on the terrain at their local origin. > > It's not as convenient as an image-based approach - but for objects > of more complexity than a tree, I think you need a better positioning > scheme. Rather than inventing 'Yet Another' textual file format, can I suggest you use an existing one? My current two favourites are XML or Scheme (the latter only makes sense if you planned to embed a scheme interp anyway, but that *is* quite good way of allowing scriptability - e.g. abominable snowmen wondering around ;-) The rationale for this is that parsers are moderately annoying to write and debug (I've written a few) and any simple language you design may later turn out not to have the power you need. XML and Scheme, due to their nested nature, are capable of representing arbitrary information relatively compactly, and you can just link in a well-known stable lib to parse the file. Jules -- Jules Bean | Any sufficiently advanced jules@{debian.org,jellybean.co.uk} | technology is indistinguishable jm...@he... | from a perl script |