main:amundsen

OVERVIEW


Some time after I left Pyro Studios, I was asked to program a game engine to create graphic adventures for children. The name comes for Roald Amundsen, one of the biggest adventurer 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 use libSDL to manage windows tasks, window creation, window events, etc, and OpenGL as graphic system.
  • Programming based on scripts. The engine use AngelScript as script system. The scripts are based on events, such as: OnInit, OnEnterRoom, OnUpdate, OnMouseClick, etc. For instance, a script that is to made walk the player when entering in 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 define as rooms. Rooms are composed by any number of layers. Rooms can include zoom lines, so, you can define diferent positions and its zoom asociated. Entitie zoom is calculated interpolating the zoom values of the two lines between it are. Rooms can be sectorized, this is necesary 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 dummys. Every object has its own shared properties (as name, size, position, scripts, etc) and its specific properties (as image file, 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 it 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 secuences, every secuence has a name an a flag that indicates if it is loopeable. Every frame in one secuence 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 editor you can create these IDs and associate them to any number of languages strings.


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