The beginning of any game development starts with setting up a simple project. The game will then grow from there.The first two tutorials have been covered already by Anael in his tutorial, but in the interest of completion, I am going to cover it too.
To begin with, let’s have a quick look at Maratis itself. What we have is 5 main components which interest us:
- Maratis Editor – The tool used to create levels and link everything together.
- Maratis Player – The executable to simply “play” a game.
- Maratis Engine – MCore and MEngine libraries (in Windows, .dll) which provide a lot of the functionality of the engine.
- Game data – 3D models, textures, lua scripts, anything the game will need to know about.
- Game plugin – The game specific functionality (in Windows Game.dll) which provides everything your game needs to be awesome.
For simple games you can usually get away without creating a game plugin entirely, doing the entire of the game logic using lua scripts. This however wouldn’t be the most optimal, the last thing you want, if you have the game keeping track of thousands of bullets, it will add extra slowdown if Maratis has to dance back and forth from Lua. In general, things in lua scripts should be the very highest level of design.
So, let’s fire up Maratis Editor.
The first thing you see is the happy blue colour. Click through the logo, bring up the File menu and create a new project. Save it somewhere. I suggest making a folder for any development work to be saved. I have C:\dev which houses all my various project stuff. Inside that, I’ve made a folder called tutorial and saved my tutorial.mproj within that.
Right, so we have a very basic project. Save the level as tutorial.level. Now we can get working. It’s important not to start throwing in all the art assets needed for the amazing FPS game that you’re going to make at this stage. It’s best to take it one step at a time and make sure everything’s going well. For this reason, head over to the Maratis examples and find a box.mesh file. You’ll find it within the Demos/meshs folder. Stick that in our tutorial/meshs folder. It’s a 3D model we know works, so it’s a perfect test to make sure we know what we’re doing.
Next thing, we need to make a new box entity. For this, click the icon at the top of Maratis which looks like a little person. That’s the add Entity button. If you’ve put box.mesh in the correct folder, you should see it waiting for you. Add it. Now we have a black box on the screen. Looks sort of too tall to be a proper cube. That’s because of the perspective. Now add a light, using the sun icon next to the entity man and, using the blue arrow that appears (and the red if you want) move the light source away from the cube. Now you can see what’s going on more. I won’t cover manipulating the world in too much detail. It’s fairly self explanitory. If you’ve done everything right you should have something that looks like this:
The one thing left is to do is to make a camera so Maratis knows what to draw. It’s the icon to the left of the entity man. Stick one in the world and place it somewhere looking at the box. Once you have it all how you want it, hit pacman to see the “game” play. For now all you’ll see is our nicely lit cube.
In the next tutorial, you’ll set up a game plugin and make a framework for adding all the functionality we need for our game.