Map Tutorial


Part 1: Setup


Unity Setup

First, you have to install Unity, these are the versions you can use to make maps:

Then, create a new Unity 3D project and make sure to use one of the correct Unity versions or else your map won't load.

Change the project color space from gamma to linear to have materials not look desaturated Edit > Project settings > Player > Color space

Map Setup

Download GOIWBF Level Tools then go to Assets > Import package > Custom package then choose the file. While importing, you can deselect the example map because it's unnecessary.

GOIWBF Level Tools

Create a new folder in the Assets folder called Scenes, then create a new scene by right clicking and name it to your scene name. There can be multiple scenes in a map. When your scene file is created, it might show a prompt saying do you want to reload, press no so any changes don't get undone.

Select the scene file in the asset explorer. At the bottom right, there is a section saying asset labels. Click the first dropdown then create new, then type your map name, then set the 2nd dropdown to "Scene"

Double click the scene file, then delete the "Main Camera" object, but keep the directional light.

Create a new empty object by right clicking the scene heirarchy, then Create > Empty and rename it to "startPos", then set the position of it to zero. This is the object that determines where the player will start in the map.

Part 2: Objects


Objects should be in the terrain layer or background layer. The terrain layer uses the 2D camera, and the background layer uses the 3D camera. Click on the "Layer" dropdown menu at the top right then click edit layers. Set layer 10 to Terrain and 12 to Background. Colliders are required to be on the terrain layer to have hit sounds.

Model

To add a model into your map, drag a model file (fbx, obj) into the asset explorer. Then, drag it from the asset explorer into the scene. In order to edit the material, you need to create a new material by right clicking then Create > Material

Select the material file, then you can change the shader to one in the dropdown menu. Realistic models should have "Standard" or "Autodesk Interactive", and low poly models should have "Standard (Specular setup)"
Uncheck the "Reflections" checkbox for now, so the model doesn't change color when you get close to it.

Sprite

To add a sprite into your map, drag an image file into the asset explorer. Then, select the image and change the type from "Default" to "Sprite (2D and UI)" and change mesh type from "Tight" to "Full rect". Also, to reduce file size, enable crunch compression checkbox then set the quality to around 20. Drag the sprite into the scene then set the Z position to zero.


It's recommended to add objects in batches to work faster, each batch can have from 20-500 objects and you can add them all at once to the scene.

Colliders

Colliders are polygons that determine the shape of the object you collide with. They also have a hit sound and friction value.

To add a collider to a 3D object, the heirarchy should look like this:

object with collider
|
-----object with mesh

The collider object is outside of the mesh object because colliders shouldn't be rotated in 3D space.

To add the collider, add an empty object with a Z of zero and then copy and paste the mesh object's X and Y positions into the empty object's X and Y positions. Drag the mesh object into the collider object.

Then, on the collider object, click "Add Component" in the inspector then search for "Polygon Collider 2D". When the collider is added, it should be a pentagon and you can click the edit button to edit the points. When you finish the collider, click the small dot next to "None (Physics Material 2D)" then select whichever friction value you want to use. You can also navigate to GOIWBF Level Tools/Friction Materials in the asset explorer then drag one of the physics materials into the physics material input. If you want custom friction values, you can duplicate one of the friction values with CTRL+D then rename it and edit the friction value

  • Static Friction (1): Low friction, should be used for slippery ice or something
  • Super Friction (10): Friction used in the default map, almost every object is this friction
  • (25): Frictions like 25 or 50 should be used if you want to prevent slipping on objects
  • (100000): Max friction, allows you to negative pull on anything

For sprites, you can add the collider anywhere you want, but the best way is to put it directly onto the sprite object. There is an auto generated collider, but don't use it because it is slightly bigger than the sprite and it has too many points.

To add a hit sound to the collider, click "Add Component" and search for "Ground Col" then add it. Set the hit sound dropdown to whatever you want the hit sound to be. Grass doesn't have a hit sound by default so you should use furniture.

Advanced polygon collider (auto colliders for sprites)

There is a package called Advanced Polygon Collider, and you can add a script to a sprite to automatically add a collider.

Advanced Polygon Collider

In order for this to work, you have to enable "Read/write access" checkbox on the sprite files. You also have to disable compression, but you can enable it back later.

After installing it, edit the script in a text editor, then change the mindistance variable to whatever you want the default to be. Lower values have colliders with higher resolution. Drag the script onto a sprite object, then it should generate a collider. Then, you can remove the script component from the sprite and the collider should stay.

Part 3: Bundling


Maps are stored in .scene files, which are unity asset bundles. Right click anywhere in the asset explorer, then click "Build to Level Asset Bundle". When it finishes bundling, right click the asset explorer then click Show in explorer and navigate to the .scene file. Open Steam, then click the cog wheel icon on the Getting Over It steam page, click open file location. Move the .scene file into the Getting Over It/Levels folder.

TXT File (IMPORTANT)

Create a .txt file with the same name as your .scene file. In the file, add mode=r if you want to make your map replace the default map instead of adding onto it. You can use either .txt or .mdata as the file extension.

Example txt file:

mode=r
credit=dell
bgfarplane=3000

The settings you can use in the txt file:

SettingValueDescription
creditstringmap author
descriptionstringmap description
scenestringscene name to start on
modecharacterif r, then replaces default map
skycharacterif r, then removes the default sky
camintegerif 1, then sets terrain camera to 3D
zplanefloatterrain camera Z position
farplanefloatterrain camera max render distance
bgfarplanefloatbackground camera max render distance
fogrgba hexchanges fog color (#rrggbbaa)
shadowintegerremoves hammer shadow if greater than zero
hammermatintegerprevent hammer from rendering in front of everything if greater than zero