From 7fff22aa4dd018dca9896bb320e48d6d3c63c758 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Ho=C5=A1ek?= Date: Tue, 17 May 2005 13:55:06 +0000 Subject: [PATCH] * Tux can now move horizontally after flapping following a vertical jump * Removed alpha setting from tiles again since fglrx was the culprit * More work on docs SVN-Revision: 2501 --- docs/fileformats/fileformats.xml | 118 ++++++++++++++++++++++++++++++++++++--- src/object/player.cpp | 8 +++ src/object/player.h | 3 +- src/tile.cpp | 8 --- src/tile.h | 3 - 5 files changed, 120 insertions(+), 20 deletions(-) diff --git a/docs/fileformats/fileformats.xml b/docs/fileformats/fileformats.xml index f8d6e3aa0..9bc9b1f46 100644 --- a/docs/fileformats/fileformats.xml +++ b/docs/fileformats/fileformats.xml @@ -30,7 +30,7 @@ Suite 330, Boston, MA 02111-1307, USA. SuperTux File Format Documentation OndraHosek -So you've got a text editor and want to play around with the SuperTux files, eh? Then I suppose you'll find this reference informative. (At least I hope so.) Toying around with SuperTux files using nothing but a text editor is not everyone's hobby... and writing documentation for toying around with a text editor is a sign of masochism. ;-) +This document serves the simple purpose of a reference for the files specific to SuperTux (levels, worldmaps, ...). Some of these files can be modified using an editor such as Brackets, brackets, brackets (About the Language) As you might have already noticed, the SuperTux definition files (just about for everything) are full of brackets ('(' and ')'). I know that BASIC programmers already freak out when seeing the vast amount of brackets used in C. The truth is that you can never have too many brackets. (Okay, that's a lie, but I don't know how lenient your compiler is.) "That Crazy File Format" used by SuperTux is Lisp. In most of its implementations, it is used as a programming language, but the devs simply thought why not to implement it as a data storage language. And so, the SuperTux data language, nearly fully based on Lisp, was born. @@ -55,7 +55,7 @@ Suite 330, Boston, MA 02111-1307, USA. Level Files -The level format is a bit complex, so unless you really want to write a level using a text editor, get Flexlay and don't strain yourself too much. +The level format is a bit complex, which is why Flexlay can prove itself very useful as an editor. If you are interested in how the levels look like or want to edit them manually (and find some of the parameters not self-explanatory enough), then you may read or skim through this section. ;; Generated by Flexlay Editor (or Emacs or Vi or whatever) (supertux-level ;; This initiates a level. @@ -143,12 +143,117 @@ Suite 330, Boston, MA 02111-1307, USA. ;; A reference on badguy types and their parameters is a TODO. ;; Particle systems - ;; ditto - ) + ;; It is advisable only to use one particle system at a time. + + (particles-<type> ;; Valid values for <type> are rain, snow and clouds + + (layer 201) ;; -100 are background, 0 are interactive, 200 are foreground tiles. + ;; Choose a number to put the rain between two layers. In this case, + ;; the rain is in front of the foreground tiles. (see also src/video/drawing_context.h) + ) + ) ;; End of sector ;; You can add other sectors here. -) +) +;; End of level + + +Badguys +This section describes the various badguys and their parameters. + +Common parameters +(<badguy-name> + (x 270) ;; The badguy's X coordinate. + (y 126) ;; The badguy's Y coordinate. (Note that the origin is in the top-left corner!) + (stay-on-platform #f) ;; Optional. Should the badguy do its best not to fall from the platform it's on? (NYI) +) + +Bouncing Snowballs, Flying Snowballs, Jumpies, Mr Bombs, Mr Iceblocks, Mr Rockets, Mr Trees, World 1 Noloks, +Poison Ivies, Snowballs, Spikies, Stalactites, Yeti Stalactites and Zeeklings only require this list of +parameters. Simply substitute <badguy-name> with one of the following: + +bouncingsnowball +flyingsnowball +jumpy +mrbomb +mriceblock +mrrocket +mrtree +nolok_01 +poisonivy +snowball +spiky +stalactite +yeti_stalactite +zeekling + + + +The next few sections describe the extra parameters for the other badguys. + +Dispenser +(dispenser + (cycle 3) ;; How often should a badguy be dispensed? + + (badguy random) ;; Valid values are "snowball", "bouncingsnowball", "mrbomb", + ;; "mriceblock", "mrrocket", "poisonivy" or "random". +) + + + +Flame +(flame + (radius 3) ;; How big should the radius of the circle be that the flame + ;; follows? + + (speed 10) ;; How fast should the flame be? +) + + + +Spike +Don't mistake this badguy for Spiky! Spiky is the snowball-like creature with +spikes, whilst a spike is an object serving the same purpose like the stalactite. +(spike + (direction 2) ;; 0: north, 1: south, 2: west, 3: east +) + + + +Yeti +(spike + (dead-script " +// A squirrel script that is executed once the Yeti dies. +") +) + + + + + + +Scrolling texts +Scrolling texts are used for the credits and were used for the intro and extro in Milestone 1. The format is simple: +(supertux-text + (background "extro.jpg") ; Background image (see data/images/background) + + (speed 1.5) ;; Default speed of text + + ;; Here we demonstrate the formatting characters + (text _(" + +-This is a heading +<tab>This is a normal line. + This is a line in a small font. +#This is a left-aligned line. +*This should be printed in a blue font. + +") + ) +) + +