Getting Started

From Game Editor

Revision as of 22:09, 13 June 2009 by Skydereign (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Welcome

The first thing that you will encounter when Game Editor loads is the Welcome Panel. Don't be too quick to dismiss it. It offers a number of keys to learning how to use Game Editor:



Create a new game:

If you push the Create now button, you will be presented with a little wizard that will guide you to add actors, animations and events to your game.

Get game demos:

Push the Go to demo page button to get the game demos in the Game Editor's site.

Tutorials:

If you select the Click Here For Tutorials button, you will be presented with a listing of multimedia tutorials that can be accessed. Each tutorial demonstrates a short animated lesson regarding a particular aspect of the Game Editor Program.

Get the newest tutorials button will immediately update the Game Editor program to the newest tutorials offered. To use this feature, your must have an active internet connection.

Get Help :

Push the Read the documentation button, if you want to read this documentation. Push the Go to Game Editor's forum button, to get help in our very active and supportive forum.


If you would like Game Editor to launch without showing you the Welcome Panel Box, select the Don't Show Again button. You can still update the tutorials at any time by selecting "Help -> Get newest tutorials" from the Main Editor Menu Bar. The Close button dismisses the Welcome Panel Box.


How Game Editor Works

Basic Concepts:

Game Editor is based on events and actions. It is possible to create games in a quite intuitive way. Imagine that you have a large table at your disposition. Now, place on the table the objects that compose your game. On this table you can see all your game and have a good notion of the positioning of the objects. That's Game Editor; it is your large table, your work area where the objects are manipulated in a visual way.

Before beginning to use Game Editor, it's necessary to keep in mind the concepts of Actors, Animations, Events and Actions. Actors:

Actors are your objects, the characters of your game. Each actor can have a group of animations linked to it, can be parented by another actors, follow a path, be transparent, be a text, among others. Animations:

Animation is the static image or group of images in sequence that represents an actor on screen. By the concept, one can notice that not all animations are actually "animated". Events and Actions:

Event is something that happens during the game, as for example, when the user presses a key, or clicks with the mouse, or when an actor collides with another.

Action is what should happen in response to an event. For example, when an actor collides with a rocket an explosion should be created. Game Editor has a set of predefined actions and any events can fire one or more actions.


Interface

The Main Editor Screen

After dismissing the Welcome Panel Box, you will notice Game Editor's stage.

This is the area where you will build your game. The stage is designed like grid paper. The grid dimensions and colors can be reset by selecting the menu "Config -> Preferences".

The white rectangle is a special actor called "view actor". The view actor is actually the camera that focuses the part of your game that should be shown in a given moment. It has the same attributes of an user-created actor, with the exception that it cannot have animations linked to it.

The size of view is your game screen resolution: 1024X768, 240 X 320, etc. The screen resolution can be changed using the menu "Config -> Game Properties".

The Actor Control Panel

With Actor control Panel you will control all actor's behavior. You will read more about this panel later.


Main Editor Menu Bar

File


   New Game: Clear the current game and begin designing a new game.
   Load: Clear the current game and load a previously saved game.
   Merge: Merge the current game with a newly loaded game. (If the loaded game has an Actor with the same name as an Actor in the currently loaded game, the results will be unpredictable.)
   Save: Save the changes you've made to the current file.
   Save As: Save the current game with a different location or filename.
   When saving a game, all animations, fonts, and sounds are moved into a folder that is automatically created named "data". This folder is located in the game directory.
   Export: Create the final executable game and pack the data.
   Game Editor exports a game as a single executable file.
   This executable file includes all of the game's data (animations, sounds, ...).
   Available Export Types are:
       Windows Executable: Windows executable file (Compatible with ).
           Windows version supports:
           - Windows 95, 98, Me, NT, 2000, 2003, XP
           Minimum System Requirements:
           - Windows 95
           - 32MB RAM
           - x86 compatible processor (Pentium, AMD, ...)
           - 200MHz
       Pocket PC / Handheld PC Executable: Executable file compatible with Pocket PC and Handheld PC.
       Windows Mobile-based Smartphone Executable: Smartphone executable file.
           Pocket PC, Handheld PC and Smartphone version supports:
           - Windows CE OS 3.0 (Pocket PC 2002, Windows Mobile 2003, 2005) and later
           - ARM processors (ARM, StrongARM, XScale, OMAP, PXA, ...)
           - Full screen mode only
           - Ogg Vorbis, wav, mod, s3m, it and xm music files
           Minimum System Requirements:
           - Pocket PC 2002
           - Less than 10MB RAM (need to test the game)
           - ARM processors (ARM, StrongARM, XScale, OMAP, PXA, ...)
           - 200MHz
           A MMC/SD expansion card is recommended
       Linux Executable: Linux executable file
       GP2X Executable: GP2X executable file.
           GP2X version supports:
           - Firmware 2.0.0 and later
           - Full screen mode only
           - Ogg Vorbis, wav, mod, s3m, it and xm music files
       Game Data Only: Exports only the data file without game engine. This format is used if your game has been distributed in numerous game files.
       Game Data Only for Pocket PC, Handheld PC, Smartphone or GP2X: Exports only the data file with optimizations for Pocket PC, Handheld PC, Smartphones and GP2X devices.


       Custom extensions:
           If you don't want to use the .dat extension, just rename to anything you want.
       File Association:
           If you distribute several games, you can save space by exporting only one with the executable engine.
           Rename the .dat files to .gedx extension and use a installation tool to associate the .gedx extension with the location of engine.
           So, the other games will be executed by the system when the user click in .gedx files.
   Exit: Close the Game Editor program and exit to the system.


Add Actor


   In the Game Editor universe, all game objects are referred to as Actors (is it a background, rocket, ship...).
   Actors populate the game and can be given behavior scripts  using Game Editor Events and Actions.
   Adding Actors to the game
   For a step by step walk through of how to create a Normal Actor see the Tutorials section.
   Name: Use this box to name an Actor. Actor names must begin with characters and must be followed with characters, numbers, or '_'. Script functions and variable ("vars") names are not allowed.
   Allowed: MyActor, ball, dog_catcher
   Not Allowed: /right, CreateActor, fgets
   Type: Choose the type of new Actor to be created from the drop down box: Normal, Canvas, Wire Frame Region or Filled Region.
   Normal: An Actor that can receive animations (image files that are associated with the Actor). This Actor can be used to create the widest variety of behaviors in a program.


   Canvas: Think of yourself as a budding Picasso when you use the Canvas Actor. Draw on this Actor using the Drawing Functions.This Actor allows for the drawing of lines, circles, etc.
   A Canvas Actor is depicted within the Game Editor as a cyan rectangle.The Canvas Actor can be moved or resized freely. The rectangle is invisible when the game is running in game mode. For a step by step walk through of how to create a Canvas Actor see the Tutorials section.
   Wire Frame Region: The Wire Frame Actor is used  as a sensor to carry out Actions like "Open the door" when , for example, a Normal Actor enters the Wire Frame Region. It can also be used to create a barrier that repels game objects like balls. As an example, in a pinball game, the ball might bounce off of a wire frame barrier. The Wire Frame Region doesn't register mouse clicks.
   A Wire Frame Region Actor is shown within the Game Editor stage as a green rectangle. It can be moved or resized freely. The rectangle is invisible when the game is running in game mode.
   Filled Region: Unlike the Wire Frame Region, the Filled Region Actor registers mouse clicks, like normal actors. This allows for the creation of hotspots or sensors that respond to mouse clicks without use normal actors.
   A Filled Region Actor is shown within the Game Editor stage as a blue rectangle. It can be moved or resized freely. The rectangle is invisible when the game is running in game mode.


Path

   Add a new path, or select a existing path to view and edit.
   Add Path:
   - Enter the path name and the path duration in frames.
   - Click on the "Draw" button to begin drawing the path.
   - Click on the "Close" button when the new path is finished.
   Right click in path point:
   - Linear: Set the current node to linear.
   - Curved: Set the current node to curved.
   - Delete: Delete the current node.
   Note: Dragging the first path point with the mouse will move the entire path.


Regions



   Add Activation Region:
   Activation Regions are screen areas that are defined by a bounding box and include game Actors.
   A Region, and your actors, is loaded only when the View Actor intersects it.
   The Region and all actors within the Region are destroyed when the View Actor no longer intersects it.
   Activation Regions allow your game to have many levels, each level in a game can be defined in a different Activation Region.
   The entire game, along with all of its levels, is saved in an single game file.
   Activation Regions make envisioning an entire game easy.
   An Activation Region is shown within the Game Editor as a yellow rectangle. It can be moved or resized freely. The rectangle is invisible when the game is running in game mode.
   Right click on the Activation Region's bounding box edge to initiate a pop-up selector that will allow the removal of the Activation Region from the game..
   If an Actor moves outside of the Activation Region, it will be destroyed only when the Activation Region no longer intersects with the "View" Actor.
   An Actor will be destroyed by the Activation Region when it and your ascendants are outside of the "View".
   Numerous Activation Regions with overlapped regions can be defined.
   All of an Activation Region's Actors load inside of the defined region. The Actor's parents, and Actor reference through script is also be loaded.
   Actors created with "Create Actor" will be assigned to a visible Activation Region.
   If the "View" Actor leaves a region and later it comes back, all Actors will be reloaded, except those destroyed explicitly with the "Destroy Actor" Action.
   Any Actor can be loaded with "Create Actor", even if has been destroyed explicitly.
   If no Activation Regions have been defined, all game Actors will be loaded when the game starts.


   Below, a multilevel game with 3 Activation Regions:


   Show/Hide Regions:
   Show or hide Activation Regions and Region Actors


Script



   This menu give quick access to Global code and all actor's scripts (The last five used scripts will be shown first).
   Use the Global Code option to freely add any 'C' code (arrays, structs and functions).
   'C' Language Programmers will appreciate being able to harness the full power of 'C' directly from the Script Menu.
   More about script here.


Game Mode

   Switch the Game Editor to game mode to run/test a game.
   Hitting the <ESC> key exits from the "Game Mode" and returns you to the Editor.


Configuration



   Game Properties:


   - Game resolution: Select the machine detected resolution or enter a custom resolution. On Pocket PC you can change the screen orientation.
   - Safe margin: This margin increases the view region used in Out of Vision event.
   - Mode: Specify "Window" or "Full Screen" mode.
   - Frame rate: Specify animation velocity (speed).
   - Show mouse: Specify whether the mouse cursor should be shown.
   - Suspend game if lost focus: Set "Yes" to pause the game when the window focus is lost on the desktop or to receive system messages on Pocket PC, Handheld PC and Smartphones.
   On the Pocket PC and Smartphone it will show a game screen shot and a menu to continue or exit the game.
   On smartphones this option is always active to receive phone calls.
   - Use ESC key to exit game: Select "Yes" to exit game when use press the ESC key.
   If you don't want use ESC key to exit, select "No" and use the ExitGame() function in any action in your game to exit.
   This option will works only in your exported game.
   - Motion Compensation: Select "Yes" to correct actor velocity if real framerate is slow than game framerate.
   - Audio format: Set audio frequency, mono or stereo and maximum simultaneous sounds in game.
   - Icon file: Specify the icon file to be used when exporting a game. To show the icon in Windows or Pocket PC files, specify an .ico icon file.
   - Game title: Specify the game title to be used when exporting a game.
   - Game background color: Specify the game background color
   - Pocket PC and GP2X Keys: Use to remap Pocket PC or GP2X keys to the desktop keys used in a game. The key position can be different on different machines.
   Preferences:
   - Show Grid: Show or hide the grid.
   - Grid Snap: Set grid snap to mode.
   - Main color: Set the grid line color.
   - Resolution: Set the color that symbolizes the game resolution perimeters.
   - Grid Size: Set the grid size.
   - Enable tool tips: "Yes" to turn on the tool tips. "No" to turn off the tool tips.
   - Persistent undo: If you select "Yes" Game Editor will search for the corresponding .undo file and recover your game history in next game load.
   - Maximum undo levels: Number of undo levels to record. This setting will take place only if the "Persistent undo" box is set to "Yes". Reduce the "Maximum undo levels" setting to decrease the size of the undo file.
   - Image Editor: Select an image editor to edit your animation frames. The image editor need to handle transparent PNG image files. If you don't have an image editor, use a search engine and put the query "Image Editors with PNG Support" to find a good image editor.

Help



   Documentation:
   Go to Game Editor's documentation files.
   Tutorials:
   Choose a tutorial topic to see an animated movie of one or more aspects of Game Editor's Game Design features.
   Get New Tutorials:
   Select this option to get the newest multimedia tutorials. You must have and active internet connection.
   Check for Updates:
   Select this option to get the newest latest updates to Game Editor.
   Game Demos:
   Download game demos from numerous example files that have been created by the Game Editor user community and by Game Editor programmers.
   User Forums:
   Go to the Game Editor forum and learn more about Game Editor.
   About:
   About Game Editor's development and the programmers behind Game Editor.


Info:

   -Mouse coordinates are relative to the game center.
   -Show an Actor's coordinates relative to its Parent by clicking on the Actor.
   - Actor snap status.


Actor Control Panel

The Actor Control Panel gives you the ability to create uniqueness in your Actor's behavior. The Actor Control Panel is accessed by right mouse clicking on an Actor and selecting Actor Control from the pop up Actor Menu:

The Actor Control Panel is where your Actor can be directed to display text or Animations, to follow a certain path, and/or to react in a specific way when it is assigned an Event or Action. The Actor Control Panel is a powerful feature. If you want to build successful games, it is critical that you become familiar with all of its options .

The Actor Control Panel provides you with a myriad of useful features. The following discussion deals with what each feature has to offer and how it is used.

Name:

This drop down box displays the name that you have given to your Actor. Click in this box pops up a list that displays all of the Actors in your game. You can select any Actor and modify or edit its behavior using the Name box.

Transparency:

Transparency sets the visibility of your Actor. An Actor that has 50% transparency will show some of the background that is behind itself. An Actor with the Transparency set to 0% (default) will appear as solid. Child Actors inherit the parent's transparency.

Z Depth:

This option sets the order or depth of an Actor in the game. For Example, if your game includes a tree (Actor) and a rabbit (Actor), you would set the tree Actor Zdepth behind the rabbit Actor Zdepth so that the rabbit would appear to hop in front of the tree.

Create at startup:

Actors can be created immediately upon game start up or later in the game. This option specifies whether the Actor will be created when game begins. If you set this option to No, you can create the actor by using the Create Actor action.

Clone:

Create an Actor's clone. Cloned Actors share the same Actions and Animations.

   Single: Select this option to make a single clone of your current actor.


   Array: Create a rectangular array of actors. Change the parameters to see the changes in real time.
   - Horizontal count: specifies the number of clones in a line.
   - Vertical count: specifies the number of clones in a column.
   - Distance between clones: select Automatic to get the distance from the actor's width and height.
   - Horizontal distance: choose Manual in the list above to specify the horizontal distance between actors.
   - Vertical distance: choose Manual in the list above to specify the vertical distance between actors.
   Along path : Create the clones following a selected path. Change the parameters to see the changes in real time.
   - Path: select a previously created path from the drop down box.
   - Count: specify the number of clones in the selected path.

Remove:

Remove the selected Actor from the game

Move and Stop:

Specify if the selected Actor will move along a path and show the animations while in Game Editor mode.

Tile:

Draw tiles in an actor.

   Tile Matching: Create Tile Matching. 
   Animation: Select the Animation (graphic) file from this drop down box.


   The Tile Animation (graphic) must contain 15 squared frames that form an illustration as shown above.
   - Use <RIGHT SHIFT> to erase tiles.
   - Use <RIGHT CTRL> to hide the tile cursor.
   - Use ESC to end the "Draw Tile" mode.
   Single tile: Create a Single Tile.


   Draw a single tile.
   Use the <right> and <left> keys to change the animation frame.

Text:

Specify the Actor Text and Font. (Actor Text can't receive collision events)


   Text: Type your text here. If you enter nothing, any previous entered Actor text will be removed from your actor.
   Font: Select the font that was previously created using the New Font button.
   New font: Specify a "From Image File" or a "True Type" Font to attach a font to your text.
   File: Load text from a file or save text to a file.
   Image font: Create a font from an image file.
   File: Load an image file (jpeg, gif, png, bmp, pcx, tga, xpm, xcf, lbm and tif). The image file must contain all of the image characters in one line (ASCII sequence).
   Initial font char: Set the initial image character in the loaded file.
   Numbers of font chars: Set the number of characters in the loaded file.
   True Type font:
   You can load any True Type font (.ttf files) and set the size, color, style (Normal, Bold, Italic and Underline) and soft (Anti Alias).
   Text Input:
   Select "Yes" to configure a text input Actor to receive text entered by the user.
   The text entered by the user can be retrieved in the "text" or "textNumber" actor variables.
   You can set the input length by entering some text or just by inserting blank space characters .
   If you enter more than one text line, your input will automatically become multi-lined.
   The maximum length of the input text is 255 characters .
   On the Pocket PC only, open the Soft Input Panel in a non rotated resolution.
   Text Input Configuration:
   Get input focus: Select "Yes" to get the input focus for this actor
   Draw border: Select "Yes" to draw a border around the text input box using the selected color . Left mouse click the color box to select a color.
   Draw background: Select "Yes" to draw a background behind the text input. Left mouse click the color box to select a background color.
   Cursor color: Left mouse click the color box to select a cursor color.
   Known Text Input bugs: If your text uses a True Type Font and the user enters text that is beyond the input limit, some of the characters may be lost.

Normal or Infinite:

   Select x Infinite to repeat the Actor along the x axis.
   Select y Infinite to repeat the Actor along the y axis.
   Select Infinite to repeat the Actor along both axis.
   Select Normal for no Actor repeating.

Animation:

Add, edit or remove animations and sequences in a Actor.

   Add Animation: Add a new animation to the selected Actor.
   - Specify the animation name.
   - Select the animation file (jpeg, gif, png, bmp, pcx, tga, xpm, xcf, lbm and tif).
   - Specify if the animation is contained in a single file or multiple files.
   - If the animation is contained in a single file, specify the number of horizontal and vertical frames.
   - Specify the animation frame rate.
   Notes:
   - If the image file has a color depth lower than 32 bits, Game Editor understands that the color of the first pixel (upper left corner) is the color that should become totally transparent in the image.
   - If your image has 32 bits color depth, Game Editor will consider the alpha channel (transparency channel) of the image.
   - If your image is a gif, Game Editor will consider the gif transparent color.
   - If all pixels in the image have the same color (solid image) the image will be consider solid.
   Add Sequence: Define a frame sequence based on the animation.
   - Select an animation.
   - Specify a sequence name.
   - Specify a sequence frame rate.
   - Enter the frame sequence (Ex.: 14;2;9;10;22;2;3;4...).
   Edit: Edit an existing sequence or replace an animation file.
   - Enter a new Frame Sequence.
   - Specify a new sequence Frame Rate.
   Use the Edit button to open the image editor.
   The image editor defined in the Preferences panel will be open with the selected animation frame.
   After save the frame in the image editor, the frame will be updated in Game Editor.
   Notes:
   - The image editor need to handle transparent PNG image files.
   - Before edit, the game must be saved.

Parent:

Set the Actor's Parent (the Parent can be any Actor in the game, including the " view" Actor, or "no parent"). When an Actor has a parent, when the parent is moved the child actor will be moved too.

Path:

Set the Actor's path (the path can be a created path, a "random path", or "no path").

Events:

Events happen when something occurs on an actor. For example, a user mouse clicks on an Actor or an Actor collides with another Actor. Events and Actions work together to breathe life into your Actors.

Actions occur as a follow up to an Event. For example, after a user mouse clicks on an Actor(Event), the Actor animation changes(Action) or after one Actor collides with Another Actor(Event), the Actor colliding is destroyed(Action) Envision a space ship being hit by or colliding with a bullet.

It is critical that you understand Events and Actions in order to get the most out of Game Editor.

Click here to read more detailed information on Actor Events. Click here to read more detailed information on Actor Actions. Event Inheritance:

You can use the option "Inherit events from" to make the current actor inherit events from selected actor. The current actor will have all your events plus the events from select actor.


Example:


   You have some different 'enemies' actors that move to left and right directions and can jump.
   You can create a 'baseEnemie' actor and add the events to move:
   Right key: to move to right
   Left key: to move to left
   Up key: to jump
   After select the 'enemies' actors and select "Inherit events from: baseEnemie".
   If you want make some enemy jump in a different form, just add a new Key Down event with the Up key.
   When the user press the Up key, the executed event will be the event defined in the enemy actor.

Receive events even if they occur out of vision:

Set this option to "No" to optimize your game. Actors out of vision with this option set to "No" don't receive the following events:

   Animation Finish
   Collision
   Collision Finish
   Draw Actor
   Key Down
   Key Up
   Mouse Button Down
   Mouse Button Up
   Timer 

Actor Events

Events give you an opportunity to define occurrences that happen on an Actor. For example, when a user clicks on an Actor with the mouse or when a specific key is pressed. Events and Actions go hand in hand. First, define the Event (Missile collides with Ship)and then add an Action (Destroy the Ship). Multiple Actions can be defined for each Event.

Game Editor supports the following Events:

  • Activation Event
  • Destroy Actor
  • Mouse button Up
  • Path Finish
  • Animation Finish
  • Draw Actor
  • Mouse Enter
  • Timer
  • Collision
  • Key Down
  • Mouse Leave
  • Collision Finish
  • Key Up
  • Move Finish
  • Create Actor
  • Mouse Button Down
  • Out of Vision
  • Activation Event:


Occurs when an Activation Event is received from an Actor.

Activation Events are Events sent to other Actors when a specified Event happens (Collision,MouseDown,Key Down, etc.).
Visualize a game where some Actors will be move when the main Actor is at a certain place on the game's screen. Activation Events easily serve this
purpose.



To Create an Activation Event:

Right click on an Actor to Create an Activation Event.
Select "New Activation Event" from the pop-up box, and define an Event that will generate the Activation Event. Next, choose the Actor(s) that will
receive the Activation Event.
A line will be drawn from the Actor that is generating the Event to the Actor that will receive the Event. The line is a green to red gradient. Green  
indicates the generation of the Event and red indicates the reception of the Event. The Activation Event's flow can easily be visualized via this line.
Press the Esc key to end.
Purposely, cloned Actors do not share Activation Events. This is done so that cloned Actors can be accessed individually.
Stopping the cursor on top of an activation line, opens a tool tip detailing the Activation Event.
The activation event can be removed by right click in activation line, and select "Remove"
Actors can generate Activation Events from Activation Events. This allows more complex procedures to be made.
Choose the event "Activation Event" in the Actor Control to define the Action that will occur when an Activation Event happens.
An Action can be defined depending on the Actor that is sending Activation Event. Thus, different actions can happen for different Actors' "Activation 
Events".
Choose "Any Actors" and the Action will happen when the Actor receives an "Activation Event" of any linked Actor to him.
Choose "All Actors" the action will only happen when all of the linked Actors to him send an "Activation Event".
By utilizing the "From Actor", special Actors can be made to do logical operations:
Actors "OR" are obtained through "Activation Event (Any Actor)"
Actors "AND" are obtained through "Activation Event (All Actors)"
Activation generated Events don't appear in the Actor Control, because they are not shared by the clones.
When clicked, the "Show" or "Hide" option listed in the Actor's pop-up box will "Show" or "Hide" the Activation lines on the Game Editor's screen. The 
lines are not visible in game mode.
  • Animation Finish:
Occurs when the selected animation finishes.
  • Collision:
Occurs when a collision happens with a selected side ("Any Side", "Top Side", "Bottom Side", "Left Side", "Right Side", "Top or Bottom Side", "Left or
Right Side") of a specified Actor.
Traditionally in platform games, when a player collides on the "Top Side" of a monster, the collision destroys the monster. When a player collides on 
the "Left or Right Side" of a monster the collision destroys the player.
Repeat this event while is colliding: Select "Yes" to send a collision event while the Actor is colliding. Select "No" to send a collision event only 
at the beginning of the collision.
  • Collision Finish:
Occurs when the collision with a selected Actor finishes.
  • Create Actor:
Occurs when the current Actor is created.
  • Destroy Actor:
Occurs when the current Actor is destroyed.
  • Draw Actor:
Occurs at the specified game Frame Rate. The actions in this event will be executed in every game frame.
  • Key Down:
Occurs when a specified key or sequence of keys are down.
Up to 12 keys can specified.
Clear: Click to erase all specified keys
Execute when:
Choose "At least one key is pressed" to execute the actions when at least one of specified keys is pressed.
Choose "All keys are pressed" to execute the actions when all specified keys are pressed.
Choose "Keys are pressed in order" to execute the actions when the specified keys are pressed in order. You can use this option to make cheat codes 
for your games.
If only one key is specified, this option don't is used.
Repeat: If repeat is enabled, the event will be sent while the key be pressed.
Right click to receive this event for any key press.
  • Key Up:
Occurs when specified key is released.
Right click to receive this event for any key release.
  • Mouse Button Down:
Occurs when the specified mouse button is held down.
Drag: Select Enable if the Actor will be dragged.
  • Mouse Button Up:
Occurs when the mouse enters over the actor.
  • Mouse Enter:
Occurs when the mouse enter in the actor
  • Mouse Leave:
Occurs when the mouse leaves the actor.
  • Move Finish:
Occurs when a move started with Move To action reaches the specified position.
  • Out of Vision:
Occurs when the Actor leaves the field of vision (current view size plus safe margin).


  • Path Finish:
Occurs when the selected path finishes
  • Timer:
Occurs when the specified timer elapses. A Timer must have been previously created in some Action.

Actor Actions

Action is what should happen in response to an event. For example, when an actor collides with a rocket an explosion should be created. Game Editor has a set of predefined actions and any events can fire one or more actions. Actions follow Events. If the event defines a Mouse Down click on an Actor, the Action takes place after the mouse click Event occurs.

Notes about Actors:

   - "Event Actor" is the Actor that currently receives the Event.
   - "Parent Actor" is the current Actor's parent, if exists.
   - "Creator Actor" is the creator of the current Actor, if the Actor is created in the "Create Actor" Action.
   - If an Actor's name is selected, all of the Actor's clones will receive the Action.
   - If the "Collision Event" is selected, the "Collide Actor" is the Actor that currently collides.
   - An Actor's Action is immediately  executed when an Event occurs, or it can be put in a queue, to be executed when certain frames of a specified animation are displayed. 

Action execution: Clicking the "Add" button for all Actor Actions, enables you to choose if an action will execute immediately at an Event's occurrence, or if the Action will be executed at a specific frame: "Wait for Frame". Animation: Select an Actor Animation. Frames: Enter the frame numbers where the action should happen. (For Example: 14;2...) Specify whether only the last action in the queue must be executed.


Game Editor supports the following Actions: Change Animation Change Path Conditional Action Destroy Timer Move To Script Editor

Change Animation Direction Change Transparency Create Actor Event Disable Physical Response Set Text

Change Cusor Change Z Depth Create Timer Event Enable Play Music To Anterior Position

Change Parent Collision State Destroy Actor Follow Mouse Play Sound Visibility State

Change Animation: Change the current Actor's Animation. Actor: Select the Actor that will have its animation changed. Animation: Select the Actor's Animation. Direction: Specify whether the animation starts in normal, reverse or stopped mode. This action will change the animindex variable. You can't change the animation of a collide actor. script function

Change Animation Direction: Change the current Actor's Animation Direction. Actor: Select the Actor that will have its animation direction changed. Direction: Specify whether the animation starts in normal, reverse or stopped mode. script function Change Cursor: Change the current Actor's Mouse Cursor. Actor: Select the Actor. File: Select image file (Load jpeg, gif, png, bmp, pcx, tga, xpm, xcf, lbm and tif image files). Horizontal Frames: Enter the number of horizontal frames. Vertical Frames: Enter the number of vertical frames. Hotspot X: X coordinate of the Cursor hot spot. Hotspot Y: Y coordinate of the Cursor hot spot. script function Change Parent: Change the selected Actor's Parent. Child: Select the Child Actor. Parent: Select the Parent Actor. script function Change Path: Change the selected Actor's Path. Actor: Select the Actor that will have its path changed. Path: Select a path (options include: any path that you have previously created, "no path" and "random path"). Axis: Specify whether this path affects x axis, y axis or both axis. script function Change Transparency: Change the selected Actor's Transparency. Actor: Select the Actor that will have its transparency changed. Transparency: Set the amount of transparency using the slider bar. Slide the bar to the right for greater transparency and to the left for less transparency. script function Change Z Depth: Change the selected Actor Depth. Actor: Select the Actor that will have its position changed relative to the Z axis. Z Depth: Set the amount of depth using the slider bar. Slide the bar right for greater depth and to the left for less depth. script function Collision State: Enable or Disable collisions on selected Actor. Actor: Select the Actor. State: Enable or Disable. script function Conditional Action: Call Actions if Expressions match certain Conditions. Expression 1 and Expression 2: Expressions that will be compared. Condition: Equal, Greater Than, Less Than, Greater or Equal To, Less or Equal To. The drop down lists show Actors and variables that can be used in the comparison. Create Actor: Put a new Actor in the game. Actor: Select an actor to create. Animation: Animation name for the selected actor. Parent: Select an Actor's parent (options include any previously created Actor, the "view" Actor, and "no parent"). Path: Select a path (options include: any path that you have previously created, "no path", and "random path"). x,y: Set the coordinates of a New Actor's initial position. Relative to creator: True or false. script function Create Timer: Create a Timer for the selected Actor. Actor: Select the Actor. Timer: Select the timer.

If you wish to specify a new timer, select "New Timer".

   Name: New Timer name.
   Time: Timer interval in milliseconds.
   Type: Periodic or Random timer.
   Min time: For Random timers, specify the minimum timer interval here and the maximum timer interval in the Time field.
   Repeat: "Forever" or "Specify Quantity".
   Count: If the timer is not set to "Forever", set number of repetitions here.

script function Destroy Actor: Destroy the selected Actor. Actor: Select the Actor to be destroyed. script function Destroy Timer: Destroy the selected Timer. Timer: Select the Timer to be destroyed. Destroy Timer action must be called in the actor that have an active timer. script function Event Disable: Disable a specified Event. Actor: Select the Actor. Event: Select the Event to be Disabled. script function Event Enable: Enable a specified Event. Actor: Select the Actor. Event: Select the Event to Enable. script function Follow Mouse: Make the Actor Follow the Mouse. Actor: Select the Actor that will follow the mouse. Axis: Specify if this path affects "x" axis, "y" axis, "both" axis or "none" axis (end following). script function Move To: Move the Actor to a specified position, at a specified velocity. Causes the Move Finish event when the actor reaches the specified position. Actor: Select the Actor. x, y: position. Velocity: movement velocity/speed. Use high numbers to do a instantaneous move. (Higher number = greater speed) Relative to: The Actor can be moved relative to the game center (absolute coordinate), relative to the mouse or any actor in the game. Avoid: Set the actor to avoid collisions while moving. If you select the actor name, not a clone name, all clones will be considered. If you select a actor with tiles, the bound box of each tile will be considered.

Only the actor bound box will be considered, not the real shape.

The move path is calculated only when the action is executed. So, if you need avoid collision with other moving actors, you need to call the Move To action again.

To make a more natural move, the resulting path is smoothing, so if you want to move the actor through a maze, sometimes the actor will touch the walls.


Examples:

   1) Move the Event Actor to the right 10 positions
   Actor:= "Event Actor"
   x: 10
   y: 0
   velocity = 1000 (Use a high velocity to instantaneously move an actor.)
   Relative to: "Event Actor"
   Avoid: (none)
   2) Move the view to the player position.
   Actor = "view"
   x: 0
   y: 0
   Relative to: "player"
   Avoid: (none)
   3) Move the player to the mouse position.
   Actor:"player"
   x: 0
   y: 0
   Relative to: "Mouse Position"
   Avoid: (none)
   4) Move the player to the mouse position, avoiding lakes in a terrain.
   Actor:"player"
   x: 0
   y: 0
   Relative to: "Mouse Position"
   Avoid: "lake"

script function Physical Response: Physically Move an Actor after a Collision Event. Move: After collision, move "Event Actor Only", "Collide Actor Only" or "Both Actors" Mass: Select "Use Calculated" to use the internally calculated mass. Select "Specify" to manually enter an Actor's mass. - Event Actor: Enter the Event Actor's mass in "Specify" mode or the Event Actor's mass multiplier in the "Use Calculated" mode. - Collide Actor: Enter Collide Actor's mass in "Specify" mode or the Collide Actor's mass multiplier in the "Use Calculated" mode. Final velocity multiplier: - Event Actor: Event Actor's calculated velocity multiplier. - Collide Actor: Collide Actor's calculated velocity multiplier. script function Play Music: Play selected music upon an Event. File: Select music file (Load Ogg Vorbis, wav, mid, s3m, it, or xm music files). Volume: Set music volume. Loop: Set loop count (1 to 65000 or 0 to infinite loop) Startup Priority: In slower machines, like PDA devices, the music may load very slowly. Setting the "Startup Priority" for your machine will help to address the speed issues. - High: The game stops while the music loads, but is the fastest music mode. - Medium: The game doesn't stop while the music loads, but this mode can be slow. - Low: The game will play in normal velocity, but the music load will be slow. Notes: - Music files are not entirely loaded into memory. - Only one music file will be played at a time.

script function Play Sound: Play a selected Sound upon an Event. File: Select a sound File (wav, voc, iff audio files). Volume: Set the sound "Volume". Pan: Set the sound "Pan". Loop: Set the loop count (1 to 65000 or 0 to infinite loop). The maximum simultaneous sound must be adjusted in "Game Properties" panel. script function Script Editor: Enter a C Script to be executed upon an Event. Read more aboud scripts here.

Set Text: Set or change the Actor text. See text actor. To Anterior Position: Send the Actor to the Anterior Frame Position. Actor: Select the Actor. script function Visible State: Show or Hide the selected Actor. Actor: Select the Actor. State: "Enable" (show the Actor), "Disable" (hide the Actor) and "Don't draw, but allow events" (use to speed up collision map Actors). script function


Scripting in Game Editor

Scripting is implemented using a script language compatible with C language and allows a high level of development and flexibility. The scripts are created using the Script Editor action. The Script Editor supports syntax colorizing and automatic indentation to increase your productivity. For those familiar with other programming languages, the Script Editor is the equivalent of the Integrated Development Environment or the IDE. All Actor's Actions can be called from scripts.


The Script Editor Title Bar:

The Script Editor's Title Bar shows the name of the Actor whose current script is currently being written. It also displays the Event that is recieving the script Actions. The "L" feature at the right in the Script Title Bar indicates the line that is currently being edited in the script input window.

The Script Editor Input Area:

The gray rectangular area is the input area. Type the scripts here.

The Script Editor Menu Bar:

The Script Editor Menu Bar is located at the bottom of the Script Editor input area. The Script Editor Menu Bar offers a number of options to help in accessing the features that are available for use within the Script Editor. An explanation of each Menu item is as follows:

actors:

Displays a listing of all of the Actors that have been created within a game. Left mouse clicking on the name of an Actor will save typing by inserting the Actor's name into the Script Editor input window.

variables/functions:

Displays a listing of all of the variables and functions that are available for use within the Script Editor's input window. For ease of use, left mouse clicking automatically inserts the function or variable into the Script Editor's input window. When selecting an Action or function from the "variable/functions" list of the Script Editor menu bar, the respective panel pops-up to allow auto completion of the script.

Variables:

Think of a variable as a container that holds a value. Selecting this option, allows you to create both single and array variables to use in your game. Selecting this button will open the User Variables panel that allows you to add, edit, or remove your variables. All variable attributes, excepting the variable name, can be edited.


   Add:
   - Name: Variable name. Variable names must begin with characters and must be followed by characters, numbers or '_'. Script Function names and Vars names are not already assigned. They cannot be used in the "New Variable" Name. (Example: MyNewActor OK, but CreateActor is Not OK)
   - Variable type: Integer, real (float point number) or string (max 255 characters).
   - Variable visibility: Global or Actor variable. Actor variables extends the Actor struct. Thus, an Actor variable can be accessed in the same way as the internal Actor variables. For example, use local Actor variables to make things like "Player Power".
   - Array: You can create global array variables with this option. Your index will be between zero and size.
   - Save group: If you want to save or load this variable with saveVars and loadVars functions, set the group were this variable will be saved here .

Global Code:

Use the Global Code Editor to freely add any 'C' code (arrays, structs, and functions). The sky is the limit when you use this Editor but you should have your feet well grounded in the C Programming Language in order to use the Global Editor effectively. Your knowledge of the 'C' language will serve you well here. Global Code can be accessed by any script.


   After entering your code, enter a name for it and click on the "Add" button.
   Edit a code by selecting it in "Choose" list. After completing the necessary changes, click on the "Add" button.
   Use the "Remove" button to delete a Global Code script.
   Use the "File" button pop-up panel to save or load Global Code scripts.

Note: changing any of the internal Actor's variables (x, y, xscreen, yscreen, ...) has no effect on the Global Code. To use the special actors creator or parent, put a in the caller Script Editor (like a comment: //creator)


File:


The File option gives you the ability to load a previously saved script or to save a current script in a external file.