Difference between revisions of "Inkscape-0.3.0"

From X-Moto
Jump to: navigation, search
(Draw the level)
(Installation on Mac OS X)
 
(47 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
[[de:Inkscape-0.3.0|Deutsch]]
 +
 +
 
'''Svg made with previous version of svg2lvl (0.2.0) are not compatible with this version of svg2lvl.'''
 
'''Svg made with previous version of svg2lvl (0.2.0) are not compatible with this version of svg2lvl.'''
  
Line 4: Line 7:
  
 
* [http://www.7zip.org/ 7-Zip] for extracting the Inkscape packages (Windows only)
 
* [http://www.7zip.org/ 7-Zip] for extracting the Inkscape packages (Windows only)
* [http://www.inkscape.org/ Inkscape] (0.45 and later or svn version). As the 0.45 version of Inkscape is not out for the moment, you have to download a development version (or compile it)
+
* [http://www.inkscape.org/ Inkscape] (>= 0.45)
** Windows: http://inkscape.modevia.com/win32/?C=M;O=D
 
** MacOsX: http://inkscape.modevia.com/macosx-snap/?M=D
 
** Linux: http://inkscape.modevia.com/ap/?M=D
 
 
 
 
* [http://www.python.org/ Python] (>= 2.3)
 
* [http://www.python.org/ Python] (>= 2.3)
 
* Svg2lvl converter (0.3.0)
 
* Svg2lvl converter (0.3.0)
  
= Prerequisites =
+
==Installation on GNU/Linux ==
 
 
You have to install the svg2lvl Inkscape extension.
 
 
 
== GNU/Linux ==
 
  
 
  $ tar zxvf svg2lvl-0.3.0.tar.gz
 
  $ tar zxvf svg2lvl-0.3.0.tar.gz
Line 25: Line 20:
 
Then, you can launch Inkscape.
 
Then, you can launch Inkscape.
  
== Mac OS X ==
+
==Installation on Mac OS X ==
 +
 
 +
*Install Inkscape 45.1: http://sourceforge.net/projects/inkscape/files/inkscape/0.45.1/Inkscape-0.45.1-2-UNIVERSAL.dmg/download
 +
 
 +
Put the Inkscape.app in your Applications folder, to install it.
 +
 
 +
*Download and install Python 2.3.3: http://mac.softpedia.com/dyn-postdownload.php?p=1369&t=4&i=1
 +
 
 +
*Download the Svg2lvl 0.3.0 file: http://download.tuxfamily.org/xmoto/svg2lvl/0.3.0/svg2lvl-0.3.0.tar.gz
 +
 
 +
=Install Svg2lvl 0.3.0=
  
You have to install PyXML. Get its .dmg from http://inkscape.modevia.com/macosx-snap/?M=D
+
Extract the .tar.gz with the appropriate Mac OS X tool, and copy everything from the extracted extensions directory, into the Inkscape extensions folder:
  
Then, install svg2lvl the same way as under GNU/Linux.
+
/Applications/Inkscape.app/Contents/Resources/extensions
  
== Windows 95 & 98 ==
+
*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.
 
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.
Line 38: Line 51:
 
Then, you can launch Inkscape.
 
Then, you can launch Inkscape.
  
== Windows 2000 & XP ==
+
==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.
 
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.
Line 46: Line 59:
 
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.
 
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.
  
=Tutorial=
+
==Test if the installation is ok==
  
== Check that svg2lvl is properly installed ==
+
There is a couple of ways to make sure that the Inksmoto extensions is installed correctly.
  
* Check in the 'Effects' menu that there is an entry 'X-moto'
+
*1st way: Check in the 'Effects' menu that there is an entry 'X-moto'
* Do 'Save as...' (Shift-Ctrl-S), and check that you can select the 'X-Moto Level (*.lvl)' file format.  
+
*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 IRC so we can help you find out why it failed.
+
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 ==
 
== Draw the level ==
Line 121: Line 134:
  
 
Populate it with your informations.
 
Populate it with your informations.
*smooth: put a high value to this, the bigger, the smoother your level. (If there's some glitches in the level when you play it, make this value smaller)
+
*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
+
*level id: put no space in it, only alphanumeric and digits.
 
*required xmoto version:
 
*required xmoto version:
 
**put it to 0.2.0 by default
 
**put it to 0.2.0 by default
**put it to 0.2.1 if you change the physics of one block
+
**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 function you are using in your script.
+
**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 ==
 
== Play the level ==
Line 133: Line 146:
  
 
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.
 
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==
 +
 +
*svg:[[Media:tutorial.svg]]
 +
*lvl:[[Media:Balls.lvl]]
  
 
= Update the texture and sprite list=
 
= Update the texture and sprite list=
  
Explaination TODO
+
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 [http://xmoto.tuxfamily.org/svg2lvl/listAvailableElements.xml]
 +
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.

Latest revision as of 04:00, 21 March 2013

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.