Skip to content

Map Creation

o7Moon edited this page Feb 11, 2022 · 15 revisions

Setting up your map's folder

In your TestMaps folder, create a new folder for your map. All maps in the TestMaps folder get added to the practice menu. The Maps folder is only meant for finished maps and only maps in the ’Maps.txtfile get registered when the game starts. WithTestMaps`, you only need to enter practice mode again for the map to show up in UI.

Making the map

Every custom map is an obj file containing a 3d model of the map. I suggest using Blender to model your map but you can use any 3d modelling program you want.

Exporting the map

When you are done modelling, export your map as a .obj file. Put it in the map folder you just made and name it map.obj.

Extras

Extra info related to map making

object values

some objects have options you can modify, you do this by putting something that looks like this in the object name: optionName[value]

Ladders

Adding ladder to the name of any object in blender will make it a ladder. Ladders in Crab Game only go in one specific direction, and this direction is based on the rotation of the ladder. Unfortunately, rotating objects in blender does not change this, as rotation in blender is separate from rotation in unity. to fix this, you need extra keywords in the object's name to specify how much to rotate the ladder once it gets placed ingame. These are: flip to rotate 180 degrees, and rot90 to rotate 90 degrees. rot90 is used to make sure the ladder is on the right axis, and you use flip if the ladder controls are backwards. Alternatively you can use rot[] to rotate a specific amount of degrees.

Tires

Adding tire to the name of any object in blender will make it a tire ingame. You can make these any size but I suggest making them at least 1 unit tall so that the player can tire jump. the tforce[] option adjusts the strength of the tire.

Boom

"Boom" objects are the ones that push you back when you touch them, you can make one by putting boom in any object's name. the outward force can be modified with bforce[] and an extra upward force can be modified with upforce[]

Spinners

You can make a spinner by adding spinner to the name of an object. By default they rotate 3 degrees every frame but you can change this with rspeed[]

nocol

if you add the nocol keyword to an object, it will not get a collider, and will ignore all most other keywords.

rot[]

rotates the object a certain amount after placing it ingame. Useful for objects like ladders which depend on the ingame rotation value.

invis

Makes an object invisible.

ice:

There are two keywords for ice, ice1 and ice2. ice1 is the ice from red light green light and ice2 is the more slippery ice from dodgeball.

spawnzone

The object with this name defines the spawn zone of your map. The object gets deleted and other tags don’t apply.

checkpoint

When the player steps on a checkpoint object the spawn zone gets moved above that objects so they respawn on top of it in practice mode.

safezone

These objects got at the end of race maps and any player inside the collider is considered finished. You will probably want to add ’invis` to this object as well.

Custom Materials

as long as you have "material groups" selected in the blender export window, solid color materials will be exported to map.mtl. You can also use textures, but you will need to add textured to an object’s name for textures to apply correctly.

Thumbnail

By default your map will have a simple white rectangle as it's button in the map selection menu. you can change this by adding a map.png to the map's folder.

Map config

The map.config file contains extra info about the map:

  • if allObjectsTextured is in the config then uv mappings will be applied to all objects. This can make map loading very slow so its recommended to add textured to just the objects you want textures on instead.
  • size[] determines the amount of players needed for the map to be played. Options are: small, medium, large, or any.
  • modes[] defines which modes support your map. As long as a mode’s name is in here (in lowercase) then that mode will support your map. Examples are: modes[bomb tag hat king] for bomb tag, tag, and hat king, and modes[race] for race.
Clone this wiki locally