main:amundsen

OVERVIEW


Sometime after I left Pyro Studios, I was asked to program a game engine to create graphic adventures for children. The name comes from Roald Amundsen, one of the biggest adventurers of history. The idea behind the engine was to create a game editor for the users to be able to make all tasks and not need codes anything in C++.


THE ENGINE


Some engine features:


  • Multiplatform. The games created with Amundsen can run in Windows, Linux and Macintosh. To do this, the engine uses libSDL to manage windows tasks, window creation, window events, etc, and OpenGL as a graphic system.
  • Programming based on scripts. The engine uses AngelScript as a script system. The scripts are based on events, such as OnInit, OnEnterRoom, OnUpdate, OnMouseClick, etc. For instance, a script to make the player walk when entering a room could be something like this:
  •                     // ---
                        void OnEnterRoom( Room@ pPreviousRoom )
                        {
                          // get pointer to application interface
                          App@    pApp     = GetApp();
                          Entity@ pPlayer  = pApp.GetEntityByName( "player_name" );
    
                          // hide and disable interface and show the clock cursor
                          HideInterface( 0, false );
                          DisableInterface();
                          SetCursor( "clock" );
    
                          // we move the player. Last param is to pause or not
                          // the script until the player arrived his position
                          pPlayer.Goto( Vector2f( x, y ), true );
    
                          // ... Show and enable the interface ...
                          ShowInterface( 0, false );
                          EnableInterface();
                          SetCursor( "hand" );
                        }
                    
  • Inside scripts, you can publish variables to create generic scripts. This is done as commentary inside the file.
  •                     /*
                        
                        [
                          .NAME "Script name"
                          .DESC "Script description"
                          .VARS
                          (
                            [
                              .TYPE STRING
                              .NAME "Variable name"
                              .DESC "Variable description"
                              .INIT_FROM "LAYERS"   // The value is selected from a combo box with the layers in the room
                            ]
                            [
                              .TYPE BOOL
                              .NAME "Variable name"
                              .DESC "Variable description"
                            ]
                            // ... etc ...
                        ]
                        
                        */
                    
  • Levels (game scenes and menus) are defined as rooms. Rooms are composed of any number of layers. Rooms can include zoom lines, so, you can define different positions and their zoom associated. Entities zoom is calculated by interpolating the zoom values of the two lines between it are. Rooms can be sectorized, this is necessary to use the pathfinder.
  • Layers are drawn from bottom to top. Every layer has its own properties, as name, position, size, scripts, etc. Inside layers, you can insert objects: sprites, text, images, videos, 2d primitives, areas and dummies. Every object has its own shared properties (as name, size, position, scripts, etc) and its specific properties (as an image file, a primitive type, etc).

  • THE EDITOR


    The editor only runs in Windows because it was created using Win32 API. In the editor, you create the game and the output is a package file that contains all information required by the game and is interpreted by the engine. In the image below we can see the editor running with a sample room loaded:

    Some editor features:

  • Create and define all rooms used in games, and for any rooms: layers, layer objects, set zoom lines, sectors to define a navigation path...
  • Configure scripts modifying public variables.

  • A tool to create sprites. A sprite can include any number of sequences, every sequence has a name and a flag that indicates if it is loopable. Every frame in one sequence has its own properties, as time, pivot position, alpha, subframes, event to launch, etc.
  • A tool to create fonts. Based on fonts installed in Windows, you can set the size, properties as bold, italic, antialias, border, and you can select the chars to export (supporting Unicode fonts).
  • Strings localization. All texts in a game are reference by a string ID. In the editor, you can create these IDs and associate them with any number of language strings.


  • Warning: Graphics used in samples are extracted from The Curse of Monkey Island game and has copyright from Lucas Arts.