Inkscape-0.3.0

From X-Moto
Jump to: navigation, search

Deutsch


Svg made with previous version of svg2lvl (0.2.0) are not compatible with this version of svg2lvl.

Required software

  • 7-Zip for extracting the Inkscape packages (Windows only)
  • Inkscape (>= 0.45)
  • Python (>= 2.3)
  • Svg2lvl converter (0.3.0)

Installation on GNU/Linux

$ tar zxvf svg2lvl-0.3.0.tar.gz
$ cd ~/svg2lvl-0.3.0/
$ mkdir -p ~/.inkscape/extensions/
$ cp -rf * ~/.inkscape/extensions/

Then, you can launch Inkscape.

Installation on Mac OS X

Put the Inkscape.app in your Applications folder, to install it.

Install Svg2lvl 0.3.0

Extract the .tar.gz with the appropriate Mac OS X tool, and copy everything from the extracted extensions directory, into the Inkscape extensions folder:

/Applications/Inkscape.app/Contents/Resources/extensions
  • Warning: If you have previously installed the svn version in your home dir, you should better delete it:
rm -rf ~/.inkscape/extensions

Then launch Inkscape

Instructions for Inksmoto 0.7.0 for Mac OS X: http://wiki.xmoto.tuxfamily.org/index.php?title=Inksmoto-0.7.0#Installation_on_Mac_OS_X

Installation on Windows 95 & 98

Extract the archive, then copy all of the files from the svg2lvl-0.3.0 directory into the share/extensions/ directory of the Inkscape installation. (It will ask if you want to override the inkex.py and bezmisc.py files, answer no)

Then, you can launch Inkscape.

Installation on Windows 2000 & XP

Extract the archive then copy the files from svg2lvl-0.3.0 directory into the C:\Documents And Settings\<USER>\Applications Data\Inkscape\extensions\ directory.

Then, you can launch Inkscape.

If you get a problem when you launch an X-Moto effect, i.e: "'C:\Document' not found", wait for a new development version of Inkscape, or install svg2lvl the same way as with Windows 95 & 98.

Test if the installation is ok

There is a couple of ways to make sure that the Inksmoto extensions is installed correctly.

  • 1st way: Check in the 'Effects' menu that there is an entry 'X-moto'
  • 2nd way: Do 'Save as...' (Shift-Ctrl-S), and check that you can select the 'X-Moto Level (*.lvl)' file format.

If the installation is not ok, please go to the X-Moto chat so we can help you find out why it failed.

Draw the level

Note that since X-Moto 0.2.4, you have to press F5 at the menu stage
when you modify the Levels directory (if you make a new level for example)

Draw you level using inkscape shapes (like circles, rectangles, ...), bezier curves, hand draw, ...

Tips:

  • If you are hand drawing your level, select a shape, and then press Ctrl-L, it will smooth your shape (You can press it more than one time).
  • The default zoom is 35%, try change it to 100 or 200%.
  • Don't take care of the svg dimensions, you will adjust them to fit your level in the end.

Example of level : Tuto-1.png

Change block properties

Select one of more shape that you want to transform into an xmoto block. Then go to the Effect menu, select the xmoto sub entry like in this picture:

Tuto-2.png

This windows will popup which allow you to choose your texture for the block(s).

Tuto-3.png

Then your level will look like that:

Tuto-4.png

Add entities

Add the player start and then, test your level to verify the good placement of the differents blocks.

Then, add the other entities:

  • end of level
  • wreckers
  • sprites
  • particles sources
  • strawberries

After placing the entities and moving the blocks, your level will now looks like that: Tuto-5.png

Adjust the size of the svg

The svg have to surround all the level blocks. To do that, there's two solutions:

  • Select all the objects of your svg with Ctrl-A, then open the document preferences with Shift-Ctrl-D, and click on 'Adjust the page on the selection'.
  • If you want a space between your blocks and the surroundings of the svg, then add a rectangle to your svg, a rectangle with the size of your svg, select it then press Shift-Ctrl-D and click on 'Adjust the page on the selection'. After that, remove the rectangle.

If your level is too big or too small when you want to play it, change its size.

  • Select all the objects with Ctrl-A
  • Press Shift-Ctrl-M
  • Select the 'dimensions' tab
  • Enter the modification percentage and Apply

Save the level

Now, you can save your drawing as a xmoto level. First save your svg as an 'Inkscape svg' (the export to .lvl is a destructive one). Then Save a copy with Shift-Ctrl-Alt-S, and save it as a xmoto level.

This window will popup: Tuto-6.png

Populate it with your informations.

  • smooth: put a high value to this, the bigger, the smoother your level. (If there's some graphic glitches in the level when you play it, make this value smaller)
  • level id: put no space in it, only alphanumeric and digits.
  • required xmoto version:
    • put it to 0.2.0 by default
    • put it to 0.2.1 if you change the physic of blocks
    • if you add a script to your level, put the right value depending on the functions you are using in your script.

Play the level

Copy your .lvl into your xmoto Level directory (~/.xmoto/Levels/ under Linux and MacosX), then launch Xmoto.

If you are using the 0.2.4 version of xmoto, press F5 to reload all the levels so that your level appears in the list.

Get tutorial files

Update the texture and sprite list

With new textures and sprites coming out from the net, you need a way to add this new resources into svg2lvl drop down values.

To do that, update the xml file into the Inkscape extension directory (~/.inkscape/extensions/ under Linux) with the one provided at [1] Then, from Inkscape xmoto menu, select 'Update Xmoto menus', and after that, relaunch Inkscape.

You will have up-to-date list of value for sprites and textures now.