Commander Cool 2

Commander Cool 2

Not enough ratings
Custom Maps - Getting Started
By hackfrag@orlygift and 1 collaborators
This guide helps you to create a custom level for Commander Cool 2.
The documentation is still alpha but this should give you a great start how things working.
 
Rate  
Favorite
Favorited
Unfavorite
Video
Requirements
Tiled
What Is Tiled?

Tiled is a general purpose tile map editor. It functions as a free tool to allow the easy creation of map layouts. It is versatile enough to allow specifying more abstract things such as collision areas, enemy spawn positions, or power-up positions. It saves all of this data in a convenient, standardized tmx format.

How Does Tiled Work?
At its core, the design process of using Tiled to create maps works by following these steps:
  • Choose your map size and base tile size.
  • Add tilesets from image(s).
  • Place the tilesets on the map.
  • Add any additional objects to represent game objects (collision, trigger, enemies, traps etc.)
  • Save the map as a tmx file.
Map
Commander Cool has a special directory where levels are located. You can find this path easily by using Steam
  • Right click on "Commander Cool 2" in your Steam library
  • Properties
  • Local Files
  • Browse Local Files
  • Now navigate to StreamingAssets/maps/custom


Tip: You can also edit every story mode map. It helps to understand how objects working.

Quickstart
Commander Cool 2 comes with a dummy map for a better understanding of the map structur and editor. You can easy copy the dummy.tmx map and customize it. You can also copy the story maps and modifie them.



Map map102.tmx is a good starting point to see how layers, enemies and collisions are working.
  • Copy map "story/map102.tmx" to "custom/testmap.tmx"
  • Start Commander Cool 2
  • Custom Maps
  • Select NO TITLE - map102.tmx
  • Edit the map and save
  • The map should automatically reload in the game

Create your first map

  • Open Tiled and Create a new Map (File > New ...)
  • Setup the map (see Screenshot)
  • Tile size: 128 / 128
  • Tile layer format: base64 (gzip compressed) NOT zlib!
  • OK
  • Save the map in the custom level directory (StreamingAssets/maps/custom) (File > Save As ...)


Set Author and Title
Without a author name and a title the level is not listed under "Custom Maps" in Commander Cool
  • Map >Map Properties
  • Use the (+) button in the bottom of the panel
  • Add "title" and "author" with the relevant strings

Layers
Every level must have the following layers. Please note the order of the layers, that is very important!



Create the tile layer
  • Layer > Add Tile Layer
  • Foreground
  • Background1
  • Ground
  • Background2

Create the collision layer
  • Layer > Add Object Layer
  • Name it: "Collision"

Create the object layer
  • Layer > Add Object Layer
  • Name it: "Objects"
Tileset
Add Tilesets to your map
  • Map > New Tileset
  • Image Source: Browse to the custom level directory and choose for example "Tileset_Stoneage_Ground_Lava_sliced.png"
  • Tile width 128px
  • Tile height 128px
  • Margin 1px
  • Spacing 2px
  • OK



Draw tiles
Now that we have a Tileset we can draw tiles on our tile layer.
  • Select your Tile Layer (eg. Ground) in the Layers panel
  • Now select one or more tiles in the Tilesets panel
  • Make sure you selected the "Stamp Brush" Tool (Shotcut B)
  • Draw on the map



The Grid

To make life easier you can activate the grid and use the handy "snap to grid" feature
  • View > Show Grid
  • View > Snap to Grid
Collision
Make the ground collidable
  • Select the "Collision Layer" in the Layers panel
  • Select the tool "Insert Rectangle" (Shortcode R)
  • Click and hold on the map to start making a rectangle. Release for placing the rectangle on the map.

Player & Finish
The player
So far we have a nice ground with a collision object. Now we need the player to spawn.

  • Select the "Objects Layer" in the Layers panel
  • Select the tool "Insert Rectangle" (Shortcode R)
  • Click and hold on the map to start making a rectangle. Make a rectangle with the size of 1x1
  • Select the tool "Select Objects" (Shortcode S)
  • Now select the just created object
  • Go to the Properties Panel and enter "PlayerSpawnPosition" in the "Type"-Field




The Finish
Next up is the finish of the level.
  • Select the "Objects Layer" in the Layers panel
  • Select the tool "Insert Rectangle" (Shortcode R)
  • Click and hold on the map to start making a rectangle. Make a rectangle with the size of 1x1
  • Select the tool "Select Objects" (Shortcode S)
  • Now select the just created object
  • Go to the Properties Panel and enter "Finish" in the "Type"-Field

Save & Load
We are ready now. We have new custom level with a start and a finish.

  • Start Commander Cool 2 via Steam
  • Custom Maps
  • Select your new level

Next
We have setup a workshop forum for more help and informations.
You will find it here workshop.commander-cool[DOT]com