Re: [tuxracer-devel] Creating new levels (was: (no subject))
Status: Beta
Brought to you by:
jfpatry
From: Jasmin P. <jf...@mu...> - 2000-03-31 17:14:26
|
On Fri, 31 Mar 2000, Jules Bean wrote: > 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. Yes, I agree, and that's why I use a Tcl interpreter to interpret ~/.tuxracer and the course.tcl files. Adding new Tcl commands is very easy, and that's what I would do to specify the locations and orientations of objects on the course (instead of using a separate text file). Cheers, Jasmin |