Using the Editor

The editor is a tool, available for computer platforms such as Windows and Linux, that allows you to change several aspects of a game created with Rockbot engine, edit its levels, dialogs, cutscenes, enemies and their behavior and more.

This tutorial will give some small explanations on how to use it giving also a few secrets and tips.

First tip, if you have multiple games inside the games folder, it will witch one you want to load when opening this app.

Game Basics

In this tab you can set some information and details for the game, so let’s give a brief explanation of each field.

  • Name: Just how the game is called.
  • Style: Not used right now, but in the future the idea is to expand the engine so it could run also MetroidVania like games.
  • Number of Stages: Not used right now.
  • Special Item #1 and #2: This will define what is the item the player will gain after beating certain bosses (TODO: give stage numbers). The item must be first be created to appear in this list, so check the Items section in this document.
  • Semi-Charged Projectile: For player chamracters that can charge shots, this will determine what is the projectile that will be fired if attack button is released before the shot if fully loaded/charged.
  • Names/Faces: This will set the face (from images/faces folder) that is shown in stage selection for each stage.
  • Music: All those options are kind of self-explanatory, just set what music will play in each screen.
  • Final Boss: Defines witch enemy is the game’s final boss, thus, one he is beaten, the game ending starts.
  • Castle Points: Deprecated, will be removed in a future release.

Game Scenes

Here you can just pick witch cutscene, if any, will play in each of those events.

Stages

In this screen you set a number of properties and dialogs for each stage.

Stage Properties Block:

  • Stage: Select the stage you want to edit
  • Enabled: Depreacted, will be removed on a newer release
  • Stage Name: What will appear in stage-selection
  • Music: The background music that plays for this stage (from music folder)
  • Scene Before/After: You can set a cutscene no appear before you start the stage or after you beat it.

Dialogs Block:

  • Language: The language you want to edit the dialogs for.
  • Boss Name: The name of the boss for this stage, will be shown in the stage-select screen.
  • Dialog Person Face: The face that will appear speaking with the player on the dialog.
  • Dialog and Player Answer are just the order the dialog is presented. First someone (can be the boss or an ally) speaks, than the player character, than the someone and then the player again. But all are optional, leave as empty, and that dialog will not appear. Thos appear when stage starts.
  • Dialog Player: Select what is the player character that is replying to the person that starts the conversation.
  • Boss dialogs is similar to the previous dialog, but is started when player reaches and enters the boss room.

Maps

Well, there is a lot to talk about this section, so I will sub-divide into chapters for each functionality as seen on the left menu.

TBD

Anim Tiles

Here you can create an animated tile that can be used in the map editor. The animation must be repeated by adding frames to the right of the first one.

  • Import Pack: Deprecated
  • Add Block: Create a new animated tile, it will be placed in the end of the list, with the hightest number plus one.
  • Current Block: What is the anim tile you are editting. Each tile is determined by a number.
  • Graphic: The file associated, stored in images/tilesets/anim.
  • Frame Delay: What the current selected frame will last on screen before changing to the next one. You can change the selected frame by clicking on the grid on the right side.
  • Preview; Here you can see the animation of the tile.

Weapons

You can just set properties for the 8 weapons the player will obtain

  • Weapon: Select witch one you want to edit
  • Name: Weapon name as will appear on the weapon selection screen
  • Projectile Type: What is fired when player selected this weapon, please refer to Projectiles section.
  • Charged Projectile: Currently not used, will allow the player to charge a weapon and fire another more powerful project.
  • Damage: What is the damage that weapon will make in a regular enemy without any weakness to it

Projectiles

Here tou create the projectiles both player, weapons and enemies will fire.

  • Add Projectile: Inserts a new one into the list.
  • Selector: Pick what is the projectile you are editting.
  • Name: The proijectile name, not used inside the game, but useful to pick on weapon/player/enemy properties.
  • Sound Effect File: Picks a custom sound (from sfx folder) when this projectile is fired.
  • Trajectory Type: This determines the behavior of the projectile after being fired.
  • Image Width/Height: Determine the size of the projectile sprite, as same as the animated tile, you can have multiple frames on the right size of the image.
  • Destructible/HP: Indicated player could damage the projectile itself to destroy it, currently unused.
  • Explosive: Explodes when reaching the target, leaving fire that will damage the area.
  • Vanishes on Hit: Once hitting a target it will dissapear, or should continue.
  • Max Shots: The limit for simultaneous projectiles of this type on the screen fdired by the player.
  • Speed: How many pixels it will move each game cycle (game targets 60-fps currently)
  • Damage: How many hit points it will subtract from target. Some effect-only projectiles like wind-push do not make damage, for example.
  • Preview: Image of the weapon with all the frames.

Enemies

On this tab you can edit the enemies properties and graphics.

General

  • Add Enemy: Insert a new enemy in the list.
  • Enemy: Select the enemy to be edited.

Properties

  • Name: The enemy name.
  • Hit Points: How many points or damage an enemy can take until it dies
  • Projectile Origin: Determine the point the projectile will appear when shot by this enemy, this is shown as the cross between two green dashes lines in preview area, if different than zero. If both X and Y are zero, if will appear in be center of the enemy.
  • Is Ghost: Enemy can pass through walls.
  • Is Boss: Is a boss, but this does not mean it is the stage boss, that needs to be set on the map edit tool, it just makes him behave a little different when appearning on screen.
  • Can Fly: Gravity does not affect this enemy.
  • Is Sub-Boss: Is a sub-boss in the stage. The door next to him on the right will only open once he is defeated.
  • Shield type: Determine shielding behavior, if any:
    • No shield: The enemy does not have any type of protection.
    • Full Shield: Enemy reflects projectiles as long as the animation-type is SHIELD.
    • Front: Enemy takes no damage if standing or walking and the projectile comes from the front.
    • Stand: Enemy takes no damage if standing.
    • Disguise: While standing any projectile passed through the enemy.
    • Stand Front: Enemy takes no damage if standing and the projectile comes from the front.
    • Stand and Walk: Same as Front, just ignore this.
  • Move Speed: How many pixels the enemy will move each game cycle (target is 60fps and game resolution is 320×240).
  • Range: maximum number of pixels it can move before the AI action is finished.
  • Weaknesses: For each weapon, determine a multiplier for damage. If zero, it takes no damage from that weapon.
  • Auto-Respawn Delay: Time, in milisseconds, until the enemy reappear. Most of the enemies will only reapear when out of the visible screen, but you can change this behavior in AI edit tool.

Graphics

  • File: The graphic file located in images/sprites/enemies, each frame is put side by side, enemy must be facing right on the graphic.
  • W/H: Width and Height for each frame.
  • Background: Your enemy may be a large one that has no movement on most of its body, so you can use background to set a fixed image for it.
  • X/Y: The position of sprites in relation to the background image (0,0 is on left top).
  • Vulnerable area: Your enemy might have only a small weak point. Use this to define iot, otherwise it will take all size as vulnerable. If no default, the vulnerable area will appear as a translucent red rectangle in the preview area.
  • Frame Type: select the animation type to show the list of frames for it and allow to add/remove frames from the list.
  • Left Green Arrow: Insert the select frame from the enemy image above (click each to select, a red rectangle will show what is the current selected) into the list for the given animation type.
  • Right Green Arrow: Remove the selected frame from the frame list.
  • Up/Down Green Arrows: Move the current selected frame in the list one position up or down in the list.
  • Frame Duration: Set how many milisseconds the frame in the list will last until moving animation to the next one.
  • Is Attack Frame: Define what is the frame, in an attack-type animation, that will actually insert the projectile on the screen.
  • Hitbox Area: This is not the area the enemy takes damage from, but the area it is solid to collide with walls, projectiles and players. One example of use is an anemy that can be in vertical shape in some animation types, but in horizontal for others, so you can set what is its phisical body for each single frame.
  • Copy To All Frames: If you want to use the current hitbox value for all frames of all animation types. Useful if you want to “reset” your work.

Artificial Intelligence

Here you can determine the behavior for a given enemy. There are two main parts of this AI, the reactions, that is firing some action once an event happens, and the AI cycle, that is the usual run the enemy executes.

Reactions

The reactions event types are as follow:

  • Player is in Distance Range: The distance between the player and the enemy is lesser than the value defined in the “range” option in enemy edit tab (check the ennemies section for more details).
  • NPC was damaged: When the enemy took damage.
  • NPC was killed: execute a post-morten (after-death) action.
  • Player is same Y coord: The vertical position of enemy and player are on the height range.
  • Player is close: Similar to first option, but cut to one fourth (1/4) of the range value.
  • TBD: still not used (any suggestions?)

The actions are the possible behaviors the enemy can execute and is a long list, going from move ahead to spawn an object or another enemy.

The description of each action and possible parameters will be added to this document on a later date.

To avoid repetition, each time the enemy starts, or then the Next Action field is set to [0] Chance, it will draw a number from 1 to 100, this is a chance percentage. In the % Chance field, you can define what is the percentage each of the actions in the list have to be the one drawn. So, for example, you have two actions and want the first to have a higher probability for being fired, you can give it 75 and the second one 25%. Please note that the editor do not care to check if you fill wrong percentage numbers as of now, so please take care to always sum 100% for all actions that can be fired. If an action should not be fired, that is, for example, is part of a chain of actions, use zero as chance value and it will never be fired by the chance draw.

The next part defines the behavior. It is important to understand how it works before. The AI in Rockbot is based upon a state machine, so the idea is that, when an action is finished its execution, the enemy goes into another state, or, in this case, another action; even if the next one is the same as current and you want to create a loop.

So, when, for example, action #1 in the above screenshot, that is walk ahead, finishes its execution by reaching a wall or the enemy’s range limit, it will then, start executing the action #2, that is to make the enemy turn – if facing left, he will then face right and vice-versa; and when the turning is done, it will go to state zero, that is the chance definition. Between each action, you can define a delay, in milisseconds, in the field Next Action Delay.

Now that you have the basics, lets take another look on the screenshot. First action has 100% chance, so it will be always be fired first, then it moves until reaching the range limit or a wall, it then turns the enemy to the other side, and again repeats, now moving ahead to the oposite direction it first moved and this repeats forever. This is a simple enemy that moves left, right, left, right…

You can be creative, and if you have ideas for new actions and behaviors, feel free to contact me by email or drop a comment here in the page.

Objects

Here you can create objects that can be used as extra-tools by the player, that are dropped by killed by enemies, generated also by enemies or other stuff.

  • Add Object: insert a new object into the list.
  • Object: current object being edited.
  • Name: The name of the object.
  • Graphic: file stored in images/sprites/objects.
  • Graphic Width/Height: Indicates the size of each frame of the object graphic, all frames must be positioned side by side.
  • Type: The object type. This defines the behavior of the object, if is one like a platform, pickable item that refill energy or other.
  • Timer Limit: The use of this number depends on object type, for example, a platform is the time it takes for start moving once activated by player stepping over it.
  • Movement Speed: How many pixels it moves each game cycle (game target is 60-fps).
  • Movement Limit: he use of this number depends on object type, for example, in a platform it indicates home many pixels it will move before inverting direction.
  • Animate Only When Active: It remains showing only the first frame of animation until is activated by the player.
  • Animation Loop: Once last frame is reached, the animation will restart, if disabled, animation will run just once.
  • Animation Reverse: Once last frame of animation is reached, start inverse until reaching the first one again.
  • Duration: Determine how many milisseconds each frame will be shown before animation advances to the next one.

Player Edit

ahahaha

Properties:

  • Player: What is the player you are editting
  • Name: Player name
  • Hit Points: Deprecated.
  • Has Shield: Can use the shield button to protect against projectiles.
  • Max Shots: How many simultaneous shots of the normal weapon it can fire.
  • Simultaneous shots: how many projectiles are fired when the player press the attack button (currently max supported is 2).
  • Damage modifier: If greater than 1, will increase the damage the player takes when hit.
  • Normal Shot: Projectile fire by normal attack.
  • Charged Shot: Projectile fired when using charged weapon, set to none to disable charged shot for the player.
  • Can Slide/Double-=Jump/Air-Dash/Shot-Diagonal: Enable or disable those abilities for the player.

Graphics:

  • Player: Current selected player for edit.
  • Graphics: Set the spritesheet for the player from images/sprites folder).
  • Face Graphic: Face of this player shown in dialogs and stage selection, from images/faces folder.
  • Sprite Size: The size for each of the player’s sprites.
  • Colors: For each weapon you can set the 3 colors that will be presented in the sprites when player changes to that weapon. The spritesheet needs to use 3 color-keys for this to work: #ff00ff, #37ff00 and #00ffff. Clicking each “color N” button will open a color-pick dialog that have a pre-determined list. (It will be changed to a dialog that will allows to pick any color in a newer version).

Armor Pieces

Determine, for each player, the ability gained when that armor piece is aquired.

  • Player: The player character that you are editting.
  • Abilities: For each part, determine the special ability that will be gained. The list is pre-determined as this is defined in the game’s engine code.