-
Notifications
You must be signed in to change notification settings - Fork 21
How to create a level
This is a simple guide on how create new levels for OpenGOO, the levels are simple svg files with some tags inside. The easier way to create a level is using Inkscape.
- OpenGOO Pre-Alpha 1 version: (guide)
- Inkscape
- Ubuntu
sudo apt-get install inkscape
- Fedora
yum install inkscape
- Archlinux
pacman -S inkscape
- Ubuntu
-
Start Inkscape
-
Set the size of the page, it will represent the display, I'll use a standard 1280x1024 (OpenGOO will scale the svg to the right size)
-
Now you can draw all the elements that form the level (the color property of these elements is optional):
- The limit of the level (rectangle tool [F4])
- Some goos start areas (rectangle tool [F4])
- Ground (line tool [shift + F6])
- Goo (circle tool [F5])
- Joint (line tool [shift + F6])
- Background (line tool [shift + F6])
- Thorn: obstacles that destroy goos (line tool [shift + F6])
-
You can also add some background shape using different svg levels (the color of the object will be displayed into the game) (line tool [shift + F6])
An example of all the elements:
-
OpenGOO use tags and names to recognize the objects of the level, change these properties opening the "object properties" with [SHIFT + CTRL + O]
-
All the elements have different properties:
-
Display is automatic
-
Limit : Id=limit label=#limit
-
Start area : id=TYPEOFGOO-ID-NUMBEROFGOOS label=#startarea (i.e. RMV-0-15)
the TYPEOFGOO could be: STD (dynamic, when its link is unremovable) or RMV (when its link is removable), BLN (balloon goo) or STK (ultra sticky goo)
the ID is a number to identify different startarea
NUMBEROFGOOS is the number of the goos that start from this area
-
Target : id=target:GOAL label=#target
GOAL is the number of goos to be collected for winning the level
-
Ground : id=WhatYouWant label=#ground
-
GOO : id=TYPEOFGOO-ID label=#goo
TYPEOFGOO could be: STD (dynamic, when its link is unremovable) or RMV (when its link is removable) and BLN (balloon goo).
ID is a number to identify different GOO
-
Joint : id=J-ID label=#joint title=GOOID1-GOOID2
ID is just the id of the joint
GOOID1 and GOOID2 are the id of the two GOO linked with this joint
example
-
Background : id=WhatYouWant label=#background-LEVEL
LEVEL is the level or the group of the background object, it must be an integer
-
Thorn : id=WhatYouWant label=#thorn
-
Save the file and copy the svg into the OpenGOO binary folder (where you have compiled or installed the game) and change the extension from svg to level
WARNING The game have problem in understanding some line object (like background or ground object) if in the xml (the svg file basically is an xml file). A path should be like this (or at least with capital m and capital z in the d sector) Some times in the d sector there are some l not recognized by OpenGOO.
EXEMPLE OF A RIGHT PATH
<path
...
d="m -412.25,1357.8083 3640,-30 -77.4728,-375.9688 -911.8702,-125.43559 -989.8905,43.6266 -319.6893,-3.3833 -14.94139,24.51561 -1511.76601,27.11838 z"
...
/>
CHECK BEFORE WITH A TEXT EDITOR
Put the level in the 'Levels' folder
Share your levels here: OpenGOO Levels