Project Template Overview - coldrockgames/gml-raptor GitHub Wiki

Project Structure

When you create a new game from the template, it contains several folders and two rooms:

  • The rmStartup (hidden in the _startup_ folder in Core of raptor)
  • The rmMain, which is the room, you will see when you hit F5

__GAME_SETUP__

In this section, you confiure your project. Take your time to look into all the files.

They all are very well documented, most of them contain examples and explain every setting available.

raptor free raptor image
image image

_gml_raptor_

The _gml_raptor_ folder contains all the Core classes of raptor. You should not make changes here, but if you do, keep in mind that they get overwritten with every new release of raptor.

You find also the _third_party_packages_ in this folder. These are libraries included by raptor, like the scribble library.

For you, as a raptor user, the Helpers folder is the most interesting. It contains little helper objects, that make your game development life a bit easier for some basic tasks.

raptor free raptor image
image image

The Rooms

By default, I have set up a main room (meant to be the main menu, the landing page, if you want).

Rooms for raptor are organized as one folder for each room.
This folder contains at least:

This is the minimum structure, I strongly recommend, when you do a raptor game.

The ROOMCONTROLLER offers lots of features and functions, specific for the room. In raptor-pro it also controls the the ROOT_UI, a ControlTree of the UI Subsystem.

PersistentGameController

In the root of the Rooms folder, you find one of very few persistent objects of raptor: The PersistentGameController.

This object is here for you, to adapt it to your needs. It shall hold and manage all the "once-in-the-game" things. The PersistentGameController is part of the Savegame System, so make sure, that you put all things, that shall be saved in the data member of the object.

image Alternatively, you can use the GLOBALDATA macro to store your global values, that shall be part of the Savegame. See there, to get more information.

Add more rooms

I strongly recommend to use The Setup Utility to add new rooms to the game. However, this tool is only available for windows. If you develop on (not for!) a different platform, I recommand, that you use the RoomTemplates, that are available at the Releases Page and will be updated with every raptor release.
Those templates contain an empty room, together with a RoomController and all layers for raptor set up, so you can start designing immediately.
Rename the room, rename the controller, and go!

Note

If you are doing a HTML game, there is also a raptor-html-template-room package available!

rmMain

This room is the first visible room of the game. It contains a single animated flag to have something to show when the game starts.
Of course, you are not required to have this as the starting room, but rmMain is a quite common and generic name, so even if you just want to use it for your intro, it should be ok.

You can select the first room to show in the Game_Configuration:

// Startup Room - The value of this constant is taken by the GameStarter object
// Set the constant to undefined to use the instance variable of GameStarter in rmStartup
#macro ROOM_AFTER_STARTER	rmMain
⚠️ **GitHub.com Fallback** ⚠️