Tutorials/01NewMap
From NeoAxisWiki
Contents |
Tutorial 1 - Creating a new map
Introduction
In this tutorial series, we are going to create a simple game. It's a simple game, but it will include all the basic techniques you need to learn to develop your own games with NeoAxis. The game we are creating is a "BreakOut" clone, a classic game where the player moves a paddle along the bottom of the screen, and keeps a ball bouncing against a group of bricks to smash them. The game ends when there are no bricks left to smash.
Preparing for this tutorial
First, you need to have a working NeoAxis SDK installed on your machine, and of course a c# development environment of your choice.
To follow this tutorial, you will need to download this file Image:Tutorial01.zip.
The zip includes 4 meshes, a material, and a texture. Once you've got the zip file, you ned to extract the folders "Materials" and "Models" to the Data directory of the NeoAxis SDK, which ,depending on you local configuration, will be something like:
C:\Program Files\NeoAxis Engine Non-Commercial SDK 0.XX\Game\Bin\Data
As there are already two folders there with the same names, your OS or Zip utility program might ask you if you want to proceed with the copy or extraction.
Once you are done, you should have two new folders called "BreakOut" on your system, as shown in the following picture:
Creating your first map
Maps are created using NeoAxis Map Editor application. This program will help a game designer to create maps for your game.
Create a new map, by using the New option on the File menu. You will be asked a name for your map, type BreakOut01 as your map name. The 01 at the end is just because you'll probably want your BreakOut game to have more than one level, don't you?
Ok, now your map is ready to be started. The first thing you must provide is some static geometry. We will be using one of the models provided for these tutorials. Search the Entity Types tree browser, placed on the right of the screen, for a type called StaticGeometry, inside the General folder. Once you click on this item in the tree, a message will appear on the screen, like in the picture:
Now following the on-screen instructions, click on the preview window, and a new StaticGeometry object will be added to the map hierarchy. The Map Hierarchy tool will show you all the objects that are placed on your map. Now, select the new StaticGeometry item and tick it. As soon as you tick this item in the tree, an Edit button will appear on the bottom right of the screen, like in the picture:
Click the Edit button and a new explorer window will appear, in order to let you add static geometry to your map. Browse the tree into the Models and BreakOut folders, and then select the mesh file called room.mesh. As soon as you select this model, your mouse cursor will turn into a brush with the shape of model on it. Using your left mouse button, place the mesh on the map by clicking once in the preview window, like shown in the picture:
Once you have added one room mesh to your map, untick the StaticGeometry item, this will end the static geometry editing mode. Now it's time to add a light to your map. To do so, browse your Entity Types tree on the right to find a type called Light on the General folder. Click on it, and then move the mouse over the room, and click to place a light anywhere near the center of the map.
Use w, a, s, d to move the camera of the preview window, and get a bit closer on the light you just created. Right clicking on the light will cause a popup menu to show, then select Move. This will show a guide that will help you move your light to another point in the map. Try to raise the light some units from the floor of the room, like shown in the picture:
Your first map is almost ready! You need to place another object in order to be able to test your work. Browse the Entity types once again, and find the type SpawnPoint on the Special folder. Place a spawn point near the basement of the room, as shown in the picture:
Now you are done. Save your map using the File menu.
You can test your map, by clicking the Play button of the toolbar, or by pressing the F5 key. You will be testing your map using the existing 'Action' game type. This will cause a FPS player to be created on the spawn point you created in your map.
In the next tutorial we will be creating a new game type for our BreakOut clone game.






