Difference between revisions of "Others tips to make levels"

From X-Moto
Jump to: navigation, search
(Level properties)
(Level properties)
Line 18: Line 18:
 
  </info>
 
  </info>
 
  <theme_replacements>
 
  <theme_replacements>
  <sprite_replacement old_name="Strawberry" new_name="Wrecker" />
+
  <sprite_replacement old_name="Strawberry" new_name="Star" />
 
  <sprite_replacement old_name="Wrecker" new_name="Star" />
 
  <sprite_replacement old_name="Wrecker" new_name="Star" />
 
  <sprite_replacement old_name="Flower" new_name="Strawberry" />
 
  <sprite_replacement old_name="Flower" new_name="Strawberry" />
 +
<sprite_replacement old_name="Star" new_name="Wrecker" />
 +
<sound_replacement  old_name="PickUpStrawberry" new_name="Squeek" />
 
  </theme_replacements>
 
  </theme_replacements>
  
Line 32: Line 34:
 
* border : border of the level [require xmoto >= 0.2.5]
 
* border : border of the level [require xmoto >= 0.2.5]
 
* music : music played while playing the level (with 0.2.5, batcave, menu1 and rideALong are available) [require xmoto >= 0.2.5]
 
* music : music played while playing the level (with 0.2.5, batcave, menu1 and rideALong are available) [require xmoto >= 0.2.5]
* theme_replacements : you can replace a special sprite like Flower by an other picture (you can replace Wrecker, Strawberry and Flower) [require xmoto >= 0.2.5]
+
* theme_replacements : you can replace a special sprite like Flower by an other picture and a sound by another one (you can replace Wrecker, Strawberry, Star, Flower and PickUpStrawberry) [require xmoto >= 0.2.5]
  
 
=== Example ===
 
=== Example ===

Revision as of 13:27, 18 February 2007

Català - Español

If you use a property requiring xmoto >= 0.2.1 for example, you must modify the level tag like this :

<level id="myid" rversion="0.2.1">

Level properties

<info>
<name>Level name</name>
<description></description>
<author></author>
<date></date>
<sky zoom="0.1" offset="0.1" 
color_r="255" color_g="255" color_b="255" color_a="0"
drifted="true" driftZoom="1.0"
driftColor_r="255" driftColor_g="255" driftColor_b="0" driftColor_a="0">Space</sky>
<border texture="Bricks" />
<music name="batcave" />
</info>
<theme_replacements>
<sprite_replacement old_name="Strawberry" new_name="Star" />
<sprite_replacement old_name="Wrecker" new_name="Star" />
<sprite_replacement old_name="Flower" new_name="Strawberry" />
<sprite_replacement old_name="Star" new_name="Wrecker" />
<sound_replacement  old_name="PickUpStrawberry" new_name="Squeek" />
</theme_replacements>
  • sky : several properties to change the sky texture (some color effects, ...) [require xmoto >= 0.2.5]
    • zoom : size of the texture
    • offset : offset with the sky when moving the bike
    • color_r color_g color_b color_a : red, green, blue and alpha color apply to the texture
    • drifted : set the drifted effect activated
    • driftZoom : size of the drift texture
    • driftColor_r, driftColor_g, driftColor_b, driftColor_a : color apply to the drift texture
  • border : border of the level [require xmoto >= 0.2.5]
  • music : music played while playing the level (with 0.2.5, batcave, menu1 and rideALong are available) [require xmoto >= 0.2.5]
  • theme_replacements : you can replace a special sprite like Flower by an other picture and a sound by another one (you can replace Wrecker, Strawberry, Star, Flower and PickUpStrawberry) [require xmoto >= 0.2.5]

Example

<sky color_r="150" color_g="100" color_b="50" zoom="3.0">sky1</sky>

SkyAtmosphere.jpg

Block properties

<block id="Block1">
	<physics grip="1.0"/>
	<position x="-0.333333" y="-5.666667" dynamic="true"/>
	<usetexture id="default"/>
	<vertex x="-7.666667" y="0.666667"/>
	<vertex x="7.333333" y="2.666667"/>
	<vertex x="0.333333" y="-3.333333"/>
</block>
all the properties are not mandatory. The default value will be given in this case.
  • id : identifiant of the block ; allow to change the block via a script
  • position : initial position of the block
  • dynamic : allow this block to move via a script if set to true
  • grip : gripness of the block ; allow to simulate ice [require xmoto >= 0.2.1]
  • usetexture : texture applied on the block

Sprites properties

<entity id="Strawberry2" typeid="Strawberry">
 <size r="0.2" width="0.5" height="0.5"/>
 <position x="42" y="0.5" angle="3.14159" reversed="true"/>
</entity>
all the properties are not mandatory. The default value will be given in this case.
  • id : identifiant of the sprite ; allow to change the block via a script
  • typeid : type of the sprite
  • r : radius of the collision circle
  • width : width of the picture [require xmoto >= 0.2.1]
  • height : height of the picture [require xmoto >= 0.2.1]
  • x : position x of the center
  • y : position y of the center
  • angle : angle to draw the sprite [require xmoto >= 0.2.5]
  • reversed : mirror the picture [require xmoto >= 0.2.5]