-
Notifications
You must be signed in to change notification settings - Fork 2
Adding your own maps
Askigh edited this page Jun 27, 2018
·
2 revisions
Playing with always the same map could be boring. Why not easily create and implement your own map into the game ?
You will find below the list of the required steps you need to achieve in order to add your own circuit
-
You need a .json file with a
POLYBEZIERBORDER
zone. You can create the json file using the cellulo-svg-to-json-gui tool. -
In the code, you need to instantiate a Map object. Here are the parameters you have to complete :
-
id
, the id of the map. You will need to add this id in a list later -
posX
, the position of the icon in the "Select your map" menu. Use the value of the last map + 250, it should work perfectly -
mapPath
, the json path -
icon
, the icon of the map in the "Select your map" menu -
firstSpawn
, a vector2d corresponding to the start of the circuit -
checkPoints
, an array of vector2d corresponding to the checkpoints of the circuit -
coins / boosts
, Optional parameter, arrays of vector2d corresponding to the coins / boosts (mushrooms) of the circuit -
endLocation
, the finish of the race
-
-
In the MapChoosing object that you should find below the default map in the main file, add the id of your map in the array