Tutorial: Let's Make a Platformer with Maker Mode!

Introduction

This tutorial walks you through building a very simple platforming game from scratch, so that you can learn the basics of making games with ACTION GAME MAKER.

It assumes that you have already finished the “Screen Tour” Tutorial that appears when you launch ACTION GAME MAKER for the first time. If you have not done it yet, or if you skipped it, please try the “Screen Tour” Tutorial from the Tutorial button on the launcher first.

The game we are going to build this time is a simple one: jump on enemies to defeat them, and you clear the game once you have defeated 5 of them.

Let’s get started right away.

Part 1: Let’s Get Ready to Make a Game!

Part 1-1: Let’s Adjust the Editor!

First, let’s customize the editor to your own taste.

  1. Launch ACTION GAME MAKER.

  2. The launcher opens. Click the “Setup” button in the upper right.

  3. The Setup window will open. Set the Font Size and the Display Scale (the size of the UI). If you leave the display scale on Auto, it will pick a size that fits your screen. Once you are done, press “Next Step”.

  4. Next you can choose a theme color. If you prefer dark themes, pick Default, AGM Dark, or AGM Midnight; if you prefer light themes, pick AGM Light, AGM Cream, or AGM Mint. Choose the color you like, press “Finish”, and you are all set.

Part 1-2: Let’s Make a New Project!

Now let’s prepare a new project.

  1. Click the “+ Create New” button in the upper left of the launcher screen.

  2. The “Create New Project” window appears, so change the project name. (We will call it “Platform Tutorial” here, but any name you like is fine.) Since we are making a platform game with the official assets, you can leave the other settings as they are. Press the “Create” button.

  3. After a short loading screen, the editor starts up — that means it worked. Your project has been created.

Part 2: Let’s Make a Map!

Part 2-1: First, Let’s Load Some Tiles!

The screen shown right after startup is the map view, so let’s go ahead and build a map here. If you have not clicked on anything, “Base” should be selected in Map Layers, and something called a Palette should be displayed below.

This “Base” is a TileMapLayer, a node for painting tiles, and the Palette is the space that shows the tiles you can paint with. No tiles are registered yet, though, so let’s add some.

  1. Click the tile settings button on the bottom panel.

  2. The “Tile Palette Settings” window opens. This is where you set up tile images and so on, but we have no images yet. Click the “Import official assets” button in the upper right.

  3. The asset list appears, and the tiles should already be expanded. Click the “>” to the left of “Auto Tiles (Base)” to expand it.

  4. The list expands and shows a variety of images. Click the checkbox to the left of AT_B_001_soil_00.png to put a check on it, then press the “Import” button.

  5. Next, a window asks whether you want to register the imported asset as tiles, so press “OK”.

  6. This image is an image for autotiles, so all sorts of settings are configured automatically. Just press the “Import” button as is.

    If you cancelled by mistake...

    You can start adding the tile over again from “Add from Image List” in the “Tile Settings” window.

    Platform1_7a

  7. The autotile is now registered, so close “Tile Settings”.

  8. The autotile should have been added to the palette underneath as well.

Part 2-2: Let’s Paint Some Tiles!

Let’s start painting right away. In the Palette, the “Pen” tool should be selected and a tile image should be selected too, so you can paint directly on the screen above.

  1. Move the mouse cursor over the screen above and a grid area appears. Click, and a tile should be placed at that spot.

  2. Drag, and you can paint tiles as if you were drawing with a pen. These are autotiles, so their shape changes automatically depending on how you paint them. If you paint something by mistake, you can erase it with a right click.

  3. The purple rectangle is the camera range, so please make an island of a reasonable size inside it.

    If painting does not work...

    Check whether “Base” is correctly selected in Map Layers, and whether “Pen” is properly selected in the palette tools. Also make sure you have not enabled “Eraser” by accident.

    Platform1_19

    Also check that the toolbar for the preview screen at the top is correctly set to :up_left_arrow: (Select Mode). You cannot paint in Move Mode, Rotate Mode, or Pan Mode.

  4. Once you have finished painting, press the :play_button: button (Run Project) in the upper right. A test play starts up, and the island you made should be displayed.

    If it does not show up properly...

    Check that the island is properly drawn inside the purple rectangle (the camera range).

That is how you make a map. Next, we will make the player.

Part 3: Let’s Make an Object!

Part 3-1: Let’s Add Official Assets with “Assets”!

In Part 3 we are going to prepare a Player Object, but first of all we have no images to use yet.

Let’s add some official assets into the game using the “Assets” function.

  1. Switch to the Assets view using the function bar at the top.

    Platform2_01

  2. Click “Import official assets”.

  3. Expand “Side View Template Images”, select “player_meika.png” and press “Import”. This is a character template prepared for a side-view action game.

  4. Just to be safe, let’s check that it was loaded properly. Switch “Folder” to “Graphics” and player_meika.png should be there. If it is not, import it again.

Part 3-2: Let’s Make the Player Object!

Next, let’s actually build the player.

  1. Switch to the “Object” view.

    Platform2_05

  2. Press the “+ New” button in the dock on the left.

  3. The “Create New Game Object” window opens, so set the object name to “Player”. You can leave everything else at its default, but if anything differs, set it up like the image below and press “Create”.

  4. A window asks whether to automatically configure the default movement input, so press “Yes”. This automatically sets up the keys for controlling the character with a gamepad or keyboard.

    If you pressed No by mistake

    Select “Move and jump” under the required elements in the player’s node list.

    Check the Inspector dock on the right, and in the input key settings set movement to the left to “left” and movement to the right to “right”.

  5. The player object is now created.

Part 3-3: Let’s Set Up Animations for the Player

Next, let’s build animations using the image we just imported.

  1. Switch the tab above the preview to “Sprite Animation”.

  2. Buttons appear in the middle of the screen. Press the lower “Load from template” button and choose “For side view”.

    If you pressed Use sprite animation by mistake...

    There is a “Load from template” button in the upper right of the screen, so use that one instead.

  3. The “Load from Side View Template” window opens. This window loads images made in a specific format all at once and turns them into animations.

  4. Let’s import the image right away. Click the “From Image List…” button in the upper right.

  5. A list of the images in the project is displayed, so select player_meika, which we imported earlier, and press “OK”.

  6. The image is loaded. What you see on the right is a preview of the animations to be loaded — 1. Idle through 6. Shoot are loaded automatically. What you see on the left is the wall collision (light blue rectangle), the hit collision (blue rectangle) and the attack collision (red rectangle), but they do not match the image, so they need to be adjusted by hand.

    What are the leftover frames after Shoot?

    This template is a parkour action template with 19 different animations. By switching the template field you can automatically load and configure all 19. We will not use them in this tutorial, so we are using the minimal template that uses only 6 of the animations.

  7. Adjust the wall collision (light blue rectangle). The wall collision is the area that detects collisions with tiles and other objects.
    Move the □ handles at the four corners of the light blue rectangle to fit the character. Roughly right is good enough, but be careful to align the feet neatly — otherwise the character will float above the ground or sink into it.

  8. Adjust the hit collision (dark blue rectangle). The hit collision is the area that gets hit by enemy attack collisions, so make it slightly larger than the wall collision.

  9. Finally, adjust the attack collision. Since this is a platformer game, let’s make the attack collision appear only at the character’s feet.
    Here is one important point: in an action platformer you can normally attack while jumping or falling, but not during other movements. So uncheck Enabled so that it becomes Attack Collision (Disabled).

  10. Once everything is set, press the Import button and you are done. Six animation sets have been created automatically.

  11. Try selecting any animation you like and pressing the :play_button: play/stop button — the animation plays.

Part 3-4: Let’s Enable Attacks Only While Jumping or Falling

Because we disabled the attack collision during the import, the player cannot attack as things stand. Let’s fix that with “Collision Animation”.

If you forgot to disable it during the import, or got the collision position wrong...
  1. Go back to the Preview tab for a moment.

  2. There are “Wall Collision”, “Hit Collision” and “Attack Collision”, so choose the one you want to change.

  3. You can adjust the collision just like during the import. (The disable setting is in the Inspector on the right.)

  4. This is only a preview, so you need to apply it to the collision animation. Switch to the “Collision Animation” tab.

  5. Select an animation in the animation set.

  6. Press the “Sync initial key” button in the upper right and your edits from the preview are applied. Do this for each animation.

  1. Select the “Collision Animation” tab to switch to it.

  2. The look of the animation changes and the collisions are now displayed. On this screen you can change the position and size of each collision for every “frame” shown at the bottom.

  3. Select “jump” in the animation set field. If you set things up correctly during the import, the attack collision at the feet should be transparent (disabled) rather than red.

  4. Select the attack collision in the Element (some hidden) field.

  5. In the jump (3 frames) field below, make sure frame 1 is selected. We are about to change the collision at the moment the jump starts.

  6. In the Inspector dock on the right, uncheck the “Disabled” property.

  7. Now the attack collision at the feet is red and enabled during a jump. The :play_button: in the upper left lets you preview the collision movement together with the animation.

  8. Next, select “air” in the animation set. “air” is the animation used for the falling state, so attacks need to be enabled here too. Repeat steps 4~7 and enable the attack collision on frame 1.

  9. The attack collision is now enabled only while jumping and falling.

  10. Finally, let’s save the data. Switch the tab back to Preview and press the “Save” button. (You can also save with the Ctrl+S shortcut.)

  11. When a thumbnail appears next to the Player object in the dock on the left, the save is complete.

The Player Object is ready after Part 3, so next we will build the program with a visual script.

Part 4: Let’s Build the Player’s Program with a Visual Script!

Part 4-1: Let’s Place the Player on the Map!

We are about to build a visual script, but before that, let’s place the player on the map.

  1. Switch to the “Map” view.

  2. Switch the tab at the top of the dock on the left to “Object” (the colored-cube icon).

  3. The “Player” you made earlier should be there, so drag and drop it into the purple frame (inside the camera range) on the preview screen.

  4. A “Confirm placement layer” window appears, so move it to the Base Layer.

  5. If “Player” is under the base layer and the character image appears inside the purple frame, you are good. If it is outside the frame, drag and drop it into place.

  6. Try pressing the test play button in the upper right — the tiles and the character image should be displayed. However, there is no program yet, so nothing moves at all. Let’s keep making.

Part 4-2: Let’s Build the Player’s Visual Script!

  1. Go back to the “Object” view and press the “Edit Visual Script” button in the upper right.

  2. It says that this object has no visual script, so press the button to create a visual script.

  3. The screen switches to the visual script. The rectangular boxes are called “states”, and each one represents a condition the player is currently in — walking, jumping, and so on. You build a visual script by connecting these “states” with things called “links”.

  4. Let’s turn “State001” into the state for “idle”. First, change its name. In the Inspector on the right, set the title in the state settings to “Idle”.

  5. Next, assign the idle animation. Scroll the Inspector up and, under the animation to assign, select “idle” in the animation category.

  6. Let’s test play with “Run Project”. The character now moves, and flips automatically when going left. However, since there is only the idle motion, it looks like the character is sliding. Next, let’s build a walking state.

Part 4-3: Let’s Build a “Move” State and Link It!

  1. Close the test play, right-click near the “Idle” state in the visual script and choose “Add State”.

  2. Another “State001” is created, so set its title to “Move” the same way and assign “move” as its animation.

  3. The “Move” state now exists, but we still have to set the condition for what has to happen to go from “Idle” to “Move”. Let’s set it up using a “link”.

  4. Right-click “Idle” and choose “Add link”.

  5. A line comes out of “Idle”, so put the end of the line on “Move” and click.

  6. The link now exists, so let’s set its condition. “While there is left or right input, move” sounds about right.

  7. Check “Trigger On Input” and an empty list of input conditions appears. Click the “+ Add Input” button.

  8. The “Input Condition Settings” window opens. In the left column choose “Four Any Input Keys”, and in the right column set the left key to “left” and the right key to “Right”, then press the “Add” button.

  9. Now it transitions from Idle to Move “while left or right of the four directional keys is held down”. Next, let’s make the opposite link, from Move to Idle.

  10. Right-click Move, choose “Add link”, and connect the link to Idle.

  11. The switch from Move to Idle happens when the movement input stops, so turn on “Trigger On No Input” in the Inspector. Now it transitions from Move to Idle once there is no input.

  12. Let’s test play with the :play_button: in the upper right or the F5 key. The character should move when you press left or right, and stop when you let go.

Part 4-4: Let’s Build the “Jump” and “Fall” States!

Next, let’s build the stars of a jump action game: jumping and falling.

Something like this sounds right: from Idle or Move, jump when the jump key is pressed; flip to falling once the jump reaches its peak; and return to Idle on landing.

  1. Right-click anywhere, choose “Add State”, name it “Jump” and assign “jump” in the animation category.

  2. The jump movement itself is handled in “Action Settings”. Turn on “Jump” in the action settings. That enables a jump.

  3. Right-click “Idle”, make a link, and connect it to “Jump”.

  4. Again, turn on “Trigger On Input” and press “+ Add Input”.

  5. In the left column select the registered key used for input, set the input key to “A” and the input condition to “Moment Pressed”, then press “Add”. Now the character jumps only at the moment A is pressed.

  6. We also want to jump while moving, so let’s make a Move-to-Jump link too. The condition is the same this time, so let’s copy it. Right-click the “Idle” → “Jump” link you just added and choose “Copy” (the Ctrl+C shortcut works too).

  7. Select Move, right-click and choose “Paste link” (or Ctrl+V). The same kind of line as “Add link” appears, so connect it to Jump.

  8. Now the character jumps at the moment A is pressed while moving as well.

  9. Next, let’s make the falling state. Create a new state next to Jump, name it “Fall” and select “air” in the animation category. This one only falls, so no action settings are needed.

  10. Connect a link from “Jump” to “Fall”. This time the condition is not an input but “when the jump reaches its peak”. For conditions like that, use “Conditions”. Click the “+ Add Condition” button.

  11. There are a lot of conditions listed, but select “JumpHeightReached” (the jump has reached its peak) under “Object Control” in the left column and press “Add”. (We will not touch the settings to the right at this time.)

  12. Now, regardless of input, the character moves from “Jump” to “Fall” once the jump reaches its peak.

  13. Finally, let’s make the transition from Fall to Idle. Connect a link from Fall to Idle. This is “when the character lands on the ground”, which again is not an input condition, so we use a condition. Press “+ Add Condition”.

  14. Landing can be rephrased as “colliding downward with a tile, an enemy, or something similar”, so in the left column select “ContactWithBody” (contact with something that has a collision box or tiles) under Object Control.
    In the right column, select “Bottom” as the incoming contact direction. Now the character transitions to Idle whenever it collides with something under it.

  15. Let’s test play. If everything is set up correctly, pressing Z on a keyboard or A on a controller (B on a Nintendo layout) makes the character jump, and it returns to Idle on landing.

    Checklist for when it does not work
    • It does not jump at all.

    Check “Jump” in the jump state’s action settings.

    • It jumps, but freezes in the jump motion.

    Check that the Jump → Fall link is correctly set to “JumpHeightReached”.

    • It cannot land.

    Check that the Fall → Idle link is correctly set to “ContactWithBody” with the “Down” direction.

Part 5: Create Enemies!

Well, we made it possible to attack enemies in the animation, but there are no actual enemies yet. Let’s create them and try attacking.

Part 5-1: Load an Enemy from a Template

Creating one from scratch is difficult, so we’ll skip that step this time by using a template.

  1. Click the “+ New Object” button in the object list on the left.

  2. Enter “Enemy” as the object name, set the Object Group to “Enemy”, the Collision Template to “Standard Enemy”, select “Sideview Walking Enemy”, and click the “Create” button.

  3. A crab-like enemy will be loaded. As mentioned in the template description, this is a simple enemy object that moves left and right and disappears when its HP reaches 0. Save it using the save button at the top or the Ctrl+S shortcut.

Part 5-2: Adjust the Enemy Template!

It functions as an enemy as is, but if you jump on it, the player also takes damage. This happens because there is a delay before the enemy disappears, allowing the player to remain within the enemy’s attack range during that time.
You need to adjust it so that the player is knocked up when stomped, preventing damage from being taken.

  1. First, the attack hitbox is too large, so let’s adjust it. Select the Attack Collision in the left list and reduce the size of the red attack preview box in the red preview screen downward to about half its size. This should prevent the player from taking damage simultaneously when using the stomp attack.

  2. Next, let’s create the knock-up effect. Press the edit button for the Visual Script.

  3. There are “Walk” and “Dead” states, so add a new state nearby using “Add State”.

  4. Name it “Damage”. Since there is no animation to assign, check the box for “Maintain Previous Animation”. This ensures the animation in use before the transition continues as is.

  5. Create the process to knock up the player. Click “+ Add Executable Action”.

  6. Select Object Operation > Set Object Velocity, and configure:
    Set “Y Operation” to “Set”
    Set “Velocity” for Y to -300
    Set “Movement Target Type” to “Last Contacted Object”.
    This will cause the last object that came into contact with the attack collision or wall collision to be knocked upward at a speed of 300 pixels per second.

  7. Connect the links. Right-click the Walk state, select “Add Link”, and connect it to the Damage state.

  8. Click “+ Add Other Conditions”.

  9. Select Object Operation > Contact with Object Attack Collision, and configure:
    Contact Direction: Top
    Object Spec Type: Object Group
    Target Object Group: Player
    Now, the state will transition to Damage when stomped from above by the player.

  10. Finally, let’s move the Walk→Dead link. Select it, right-click, and choose “Cut”. You can also use the Ctrl+X shortcut.

  11. The link will be removed but remain in memory. Select the “Damage” state, right-click, and click “Paste Link”.

  12. A line similar to when creating a link will appear. Connect it from Damage to Dead. Now, when “HP reaches 0”, it will transition from Damage to Dead.

Part 5-3: Place Enemies in the Stage!

Place enemies in the stage.

  1. Navigate to the “Map” view.

  2. Switch the tab in the Scene List dock on the left to “Object” (the blue and orange cube icon).

  3. Drag and drop the “Enemy” anywhere you like within the stage. Make sure to place it in the “Base Layer”.

  4. If the enemy is below the base layer as shown in the image, you are good to go.

Part 5-4: Enable Debug Display and Test Play!

You can test play as is, but to verify that everything is set up correctly, enable the collision debug display before testing.

  1. From the menu in the top left, open the Debug Menu and enable the checkbox for “Show Collision Shapes”.

  2. Press the “:play_button:” button in the top right or the F5 key. When test play starts, collisions such as wall collisions, attack collisions, and hitboxes will be visualized, as shown in the image below.

  3. If set up correctly, when the player jumps and stomps on an enemy, the player should be slightly knocked up, and the enemy should be defeated.

Checklist if it doesn't work

・Cannot knock up even when stomping

First, check if the red attack box is displayed under the player’s feet while jumping. If it is not displayed, check Part 3-4: Enable Attacks Only During Jump/Fall. チュートリアル: ツクールモードでジャンプアクションをツクろう! - Moonling の #2

If it is displayed but the knock-up doesn’t happen, the visual script is not set up correctly. Re-check if the link from Walk to Damage is correct and if the settings inside the Damage state are correct.

・Knocked up when stomped, but the enemy doesn’t fall

Check if the link from Damage to Dead is set up correctly. It should have the condition “HP reaches 0” set.

Part 6: Expand the Stage!

Now that we have the player and enemies, the stage is too small if it’s only one screen. Let’s expand the stage.

Part 6-1: Make the Camera Follow the Player!

First, we’ll allow movement over a wider area by making the camera follow the player.

  1. Return to the Object View, double-click the Player in the object list to open it, and select Preview.

  2. Click the “Add Setting” button. This button adds a node with functionality to the object.

  3. A window to add settings will appear. Select and add “Camera Target” from the Target and Direction options. As the name suggests, this node is used to set the object that the camera follows.

  4. The Camera Target node is added and automatically selected. In the Inspector window on the right, enter “Player” in the “Target ID” field. Note: This field is case sensitive, so the P must be uppercase.

  5. The object settings are complete, so now we configure the map. Switch to the Map View and select the “Initial Camera” node in the Map Layer.

  6. Once selected, look at the Inspector on the right. You should see “Player” listed under “Target ID.” If it isn’t there, change it to “Player.” This configures the camera to follow any object with a “Camera Target” node that has the Target ID “Player.”

  7. Test play by clicking [:play_button:] in the top right or pressing the F5 shortcut key. The camera center should now be on the player.

If it doesn't work

Check if the Player has a Camera Target node and if the Target ID is correctly set to “Player.”
Check if the Initial Camera node’s Target ID is set to “Player.”

  1. Since jumping makes the player appear in the dead center, limiting the visible area, let’s adjust it. Look at the Inspector for the “Initial Camera” node. There is an “Offset” field; set y to -20. This moves the camera center 20 pixels above the target.

  2. Test play again by clicking [:play_button:] in the top right or pressing the F5 shortcut key. The camera should now be slightly above the player, making it easier to see.

Part 6-2: Widen the Stage!

Let’s paint tiles to expand the map.

  1. Select the Base Layer.

  2. Paint tiles directly onto the preview screen. Create platforms and new floating islands, for example.

  3. Once placed, perform a test play. Check if the player can jump to each platform. If you fall off a platform, press [F5] to restart. Note that you can delete tiles by right-clicking and dragging.

  4. Add enemies. Switch the tab in the Map List Dock to the Objects list.

  5. The clear condition for this game is defeating 5 enemies. Since one is already placed, add 4 more enemies. Drag and drop enemies from the Object List Dock to place them. You are done when you have placed 5 enemies into the Base Layer.

  6. As a precaution, test play to ensure everything works correctly.

  7. If the stage widens and you want to adjust the movement speed of the character:
    Double-click the Player from the “Object” view,
    and select “Movement and Jump.”

On the right side of the screen,

Tutorial5_15
you will see the Movement and Jump settings. Scroll down to adjust items such as [Horizontal Movement Amount] or [Initial Jump Speed].

Part 6-3: Set the Background!

The gray background is a bit lonely, so let’s add a background.

  1. First, import the image. Go to the “Material Management” view and click the “Import Official Materials” button.

  2. There is a set called “Background,” so check it and import it.

  3. Once loaded, return to the “Map” view and switch the Map List Dock in the top left to “Images.” You should see new images like B_001_plain_01, 02, 03, etc. These are the background images you just imported.

  4. In the Map Layer, select “Sprite2D”, which is a child of the “Distant View” layer. Sprite2D is a node for displaying images, but currently, nothing is displayed. Check the Inspector; the “Texture” field is empty. Texture refers to the image to be displayed, so this means no image is specified. Let’s specify an image. Click the folder icon (Quick Load) to the right of Texture .

  5. A window to choose an image for the texture will appear. For this step, we need a far background image, so select the blue sky image named B_001_plain…

  6. The Texture field now shows the blue sky image, and the blue sky appears in the preview screen.

If you select the wrong image

You can reset the texture to by clicking the circular arrow button that appears in the Texture field.

You can also go back one step using the Ctrl+Z shortcut key.

  1. Next, set the middle ground. Select the Sprite2D which is a child of the Middle View, and use Quick Load in the Inspector’s Texture field. Since the middle view is the inbetween layer, choose an image of distant mountains. The name is cut off and a bit confusing, but select the mountain image named B_001_plain…

    You can also switch between list view and grid view using the button in the bottom right to help confirm.


8. Finally, set the Near View. Using the same procedure choose a grassland image for this close layer. Select the grassland image named B_001_plain…


9. The images are set, but the grassland is positioned too high, hiding the mountains and blue sky. Let’s adjust the position using Offset.

  1. Look at the Inspector for the foreground Sprite2D. There is an “Offset” field; expand it and set the offset to y=360. This moves the grassland down.

  1. The mountains are now visible, but the clouds in the blue sky are hidden. Let’s raise the position of the blue sky. Set the offset of the far background Sprite2D to y=-360.

  1. It looks good, so let’s test play… but wait… the background is cut off, and you can see the gray underneath. Next, we will make the background loop.

Why does it look perfectly stacked in the editor but is misaligned in the game?

In Action Game Maker maps, the background nodes have a “Parallax Background” feature enabled by default. This feature creates a 3D effect by changing the speed at which the background moves according to the camera’s movement.
If you move or jump, you should notice the foreground (near layer) moving faster and the background (far layer) moving slower, creating a sense of depth.
To achieve this parallax effect, the background automatically shifts and displays based on the camera’s position.

  1. This time, select the “Distant View” layer itself, not the Sprite2D.

  2. Look at the Inspector. There is an “Repeat” field; expand it to find “Repeat Size” and “Repeat Count.” Set both to x=720 and Count=5. This ensures that the same 5 images are always displayed across a width of 720 (= the width of the B_001_plain… image you set).

About Repeat Count

The repeat count is simply the number of times the image is displayed internally in the game at once. Regardless of this setting, the images will repeat infinitely.

  1. Do the same for the “Middle View” layer and the “Near View” layer. Set “Repeat Size” to x=720 and “Repeat Count” to 5. This should eliminate gaps and display the background continuously.

  2. By clicking the thumbnail of each registered Sprite2D Texture,


    the image size will be displayed.
    This is useful for checking the size of custom assets.

Part 7: Let’s Make “Getting Defeated”!

Things look quite a lot like a game by now, but there is still no clear condition and no way to be defeated, so it is not really a complete game yet. Let’s finish it off.

Part 7-1: Let’s Make “Getting Defeated” When You Take Damage!

Let’s make the game restart automatically when the player runs into an enemy or falls off the stage. We will start with running into an enemy.

  1. Go to the “Object” view and press the player’s “Edit Visual Script” button.

  2. The player’s HP is set to 1 as its initial value, so “HP has reached 0” can be used as the condition for transitioning to “Defeated”. However, the transition to “Defeated” can happen from any state — Move, Jump, Idle, or Fall. For cases like this, you can use “Any State”. Just as the name “Any State” suggests, if you draw a link from it, the transition happens from any state as long as the condition is met.

  3. Add a new state next to “Any State”, name it “Defeated”, and press “+ Add Executable Action”.

  4. Choose “ResetGame” under Game Settings and add it.

  5. Next, right-click “AnyState”, add a link, and connect it to the Defeated state.

  6. Click the “+ Add Condition” button and add “HPIsZero” (HP has reached 0) under “Variable”.

  7. Now, from any state, the game should transition to Defeated and reset once “HP reaches 0”. Test play with “:play_button:” or the F5 key and try running into an enemy.

If it does not work

Part 7-2: Let’s Make “Getting Defeated” by Falling!

This one is a little more involved, but you can do it by “limiting the camera’s movement range” and transitioning to “Defeated” when the player “goes off screen”. Let’s set up the camera first.

  1. Go back to the “Map” view and select “Initial Camera” in the map layers.

  2. In the Inspector, expand Limit and change the “Bottom” value to 300. A yellow-green horizontal line should appear on the preview screen — that is the range the camera can move in. If any platform you made is below the yellow-green line, increase the “Bottom” value to 500 or 1000 as needed.

  3. Test play with [:play_button:] or F5. The camera still follows left, right and up as before, but it should no longer follow when you fall.

  4. Once you have confirmed that, go back to the “Object” view and press the player’s “Edit Visual Script” button again.

  5. Click the “AnyState” → “Defeated” link.

  6. You can set multiple transition conditions. Let’s make it transition on the “HPIsZero” we already set or “went off screen”. Click “+ Add Condition”.

  7. Select “Offscreen” (went outside the camera range) under Other, set Target Type to This Node and Connection With Previous Condition to OR, and add it.

  8. Now “my HP has reached 0” OR “I went outside the camera range” should put the player into the defeated state and reset the game. Test play and try falling off a platform. If it is set up correctly, falling resets the game.


    You can switch between [OR] and [AND] by clicking the [OR] icon.
    image

If it does not work

The camera keeps following even when you fall: review whether the map’s initial camera bottom limit is set correctly.
Falling does not reset, and running into an enemy no longer resets either: check that the logical condition is correctly set to “OR”. With “AND”, the game only resets when you fall while your HP is 0.

Part 8: Let’s Make the “Clear”!

We decided at the start that the clear condition would be defeating 5 enemies — but how do we actually do that? We use something called a “variable”.
We create a variable called “Enemy Count” with an initial value of 0, and then increase it by 1 every time an enemy is defeated. After 5 enemies the value should be 5, so it looks like we can just set things up so that “Clear” happens when the variable “Enemy Count” becomes “5”.

Part 8-1: Let’s Make the Project Variable “Enemy Count”!

  1. Click the “Configure Variables / Switches” button at the top of the visual script screen.

  2. A new window opens, so switch to the “Project Variables” tab. There are two kinds of variables: “variables” that each object has of its own (HP, attack power, and so on), and “project variables” that are shared across the whole game. For our “Enemy Count”, a project variable is more appropriate than a per-object variable.

  3. Press the “+ Add” button in the lower left of the window.

  4. “Project Variable 001” appears, so rename it to “Enemy Count” in the input field in the upper right. *If you see “Variable 001” here, you are on the wrong tab — switch to “Project Variables”.

  5. Once you have confirmed that the tab is Project Variables and the name is “Enemy Count”, press Done.

Part 8-2: Let’s Build a UI So You Can See the “Enemy Count” on Screen!

We have the project variable “Enemy Count”, but as things stand there is no way at all to see it in game. Let’s build a UI that shows it on the game screen.
UI is built on the “UI” layer that every map has. Anything placed on this layer is always displayed at the same position on the screen, regardless of where the camera is.

  1. Switch to the “Map” view and press the + button next to “UI” in the map layers.

  2. A menu appears for choosing what to add, so select “Label”.

  3. In the Text field of the label’s Inspector, first type
    Enemies:

  4. Next, press the “Insert a Value” button above the Text field. The Insert a Value window appears, so open the list in the Name field (which shows “Player_Count”) and change it to “Enemy Count”.

  5. Once it is set and looks like the image below, press the “Insert” button.

  6. The enemy count is now displayed, but the text is small, so let’s make it bigger. Click the empty field under “Label Settings” below the Text field and add “LabelSettings”.

  7. The field will now show “LabelSettings”, so select it again and expand it.

  8. Expand Font and set the size to 64 px. That makes it big enough to read easily.

  9. Let’s test play. If “Enemies: 0” is displayed in the upper left of the screen, it worked. If something like “project.Enemy Count” is displayed, something went wrong during insertion, so insert the value again.

    *Tip
    The area used by the UI is shown by the light blue frame (it is not affected by the camera size).

Part 8-3: Let’s Increase the “Enemy Count” When an “Enemy” Is Defeated

We can display the enemy count now, but there is no way to change the number.
Let’s make the project variable “Enemy Count” increase by 1 when an “Enemy” is defeated.

  1. Go back to the Object view and double-click Enemy to open it.

  2. Press the “Edit Visual Script” button.

  3. Select the “dead” state, which handles the Enemy’s defeat. Four actions are already set, but let’s add one more. Press the “+ Add Executable Action” button.

  4. Select “ChangeObjectProperty” under Switch/Variable. This action can change all sorts of values. First, set the target in the right pane:
    Target Object Type: Project Database
    Database Type: Project Variable
    Record Name: EnemyCount
    That sets the target to EnemyCount.

  5. Next, specify how the value of EnemyCount should be changed. Expand the operator / assignment source and enter
    Target Operator: +=
    Assign Const Value: 1.0
    then press “Add”.

  6. So now the [dead] state performs += 1 on the project variable “EnemyCount”… except that, as things stand, it will not actually work. Why?
    Look at the executable actions. When there are several executable actions, they run in order from the top — and the “ChangeObjectProperty (Database | Enemy…)” you added is number 4, while number 3 is “RemoveSelf”. In other words, the object disappears before the enemy count is changed, and processing is interrupted. We need to reorder them.

  7. Click the [≡]-like button on the left of 4 “ChangeObjectProperty (Database | Enemy…)” and drag it up so it comes right after “Property | disable~~”. It is fine once it reads 1 “ChangeObjectProperty (Database | Enemy…)”.

  8. Let’s test play. If the “Enemies” count in the upper left becomes 1 when you stomp and defeat an enemy, it worked.

If the number does not change

Check that the order is correctly set to 1, and that the settings match the following when you click to expand it.

Part 8-4: Let’s Make the “Clear”!

The project variable “EnemyCount” now increases as you defeat enemies, but we still need to make “Clear” happen when it reaches 5.
This time, let’s display the text “CLEAR!” from the player object.

  1. Go back to the Object view, switch the object to Player (double-click) and open Edit Visual Script.

  2. The clear state can happen at any time too, so we link it from AnyState. Create a new state near AnyState and name it “Clear”.

  3. Press “+ Add Executable Action” and select “DisplayText” from the Text group further down. Then enter “CLEAR!” as the text body.

  4. There is a “Preview” button at the very top, so click it. In “Preview” you can adjust the position and size while looking at the actual display.

  5. A font size of 12 is too small, so change it to 64.
    After that, drag the handles to fine-tune the position. Once it is roughly in the position below, close it.

  6. Let’s adjust the DisplayText action. Scroll the right pane down a little and you will find an “Unlimited Duration” checkbox, so set
    Unlimited Duration to on.
    By default the DisplayText action disappears after a certain time, but turning on Unlimited Duration keeps it on screen unless another action is performed to clear it. Once it is on, press “Add”.

  7. The “DisplayText” action is now set, so right-click AnyState, choose “Add link”, and connect it to Clear.

  8. Click “+ Add Condition”. To transition based on a variable, use “SwitchVariableChanged” from the variable group.
    Set
    Variable Type: Variable
    Target Type: Project Variable
    A field called Monitored Project Variable then appears, so press the “Settings…” button to its right.

  9. The Variable / Switch Setting window appears, so choose “Enemy Count” and press “OK”. The variable is now specified, so next let’s set the condition’s comparison.

  10. Set
    Variable Condition: >=
    Comparison Constant Value: 5.0
    That creates the condition “when the project variable Enemy Count is 5 or more”, so press “Add”.

  11. Everything should be ready now, so let’s test play. All that is left is to check whether defeating 5 enemies shows the clear… which is a lot of work, so let’s use the debug features. Click “Debug” in the menu in the upper left and click “Open AGM Debug Monitor…” in the submenu.

  12. A screen like the one below appears, but nothing is shown until you start a test play, so let’s launch one right away.

  13. The display changes and object information for the player, enemies and so on appears. “Enemy Count” is a project variable, though, so switch to the “Project Variables” tab.

  14. Scroll down and you will find the project variable “Enemy Count”. Click the 0.0 in the “Value” column and change it to 5.0.

  15. If the enemy count on screen becomes 5 and “CLEAR!” is displayed, everything is set up correctly. You have made a game where “stomping and defeating 5 enemies clears the stage”!

*Tips
You can resume editing an action with the [pencil icon].

If it does not work

  • The project variable “Enemy Count” shows 5 on screen, but CLEAR! does not appear.
    First, switch the AGM Debug Monitor tab to Object, click the object “Player”, and check the State > Main Layer part. That shows the player’s current state.
  • If the main layer says Clear…
    The transition is working, so something is wrong with the behavior of the “Clear” state. Let’s check it.
  • If the main layer does not say Clear…
    The transition to the “Clear” state is not working. Let’s check the link from “AnyState” to “Clear”.

Part 9: Let’s Finish the Game Off with Some Polish!

The game systems are done, but with no sound and no effects it feels a little plain.
Finally, let’s add sound and effects to finish the game off. We will start with sound.

Part 9-1: Let’s Add “Sound” to the Game!

Four sounds sound about right: the stage BGM, a jump sound, a sound for when an enemy is stomped, and a clear sound. Let’s add them, starting with importing the assets.

  1. Go to the Assets view and press the “Import official assets” button.
  2. Switch to the “Sounds” tab, select the following four and “Import” them.
    bgm > Battle_pop1
    se > Movement & Action Sounds > Jump1
    se > Attack & Weapon Sounds > Blow1
    se > Progress & Result Sounds > Stageclear1
  3. A window asks whether to register the imported assets in the sound database, so press “Yes”. Asset registration is now complete.
If you closed it without registering to the sound database by mistake...
  1. Press the Database button in the menu bar.
  2. The Data Management window appears, so switch to the “Audio Database” tab and press the “Bulk Register to Sound Database” button.
  1. Next, let’s set up each sound. First the map BGM. Switch to the Map view and select “Map Settings” at the top of the map layers.

  2. Expand BGM Settings in the Inspector and set
    Sound Data: Battle_pop1
    Loop: on
    The stage now has BGM, so try a test play to check it.

  3. Next, let’s set the clear sound and the jump sound on the player. These use visual script actions, so switch to the Object view and open the player’s visual script.

  4. Select the “Jump” state and press “+ Add Executable Action”.

  5. Select “PlayAudio” from the Media group, choose Sound Data: Jump1, and press “Add”.

  6. In the same way, add “PlayAudio” with Sound Data: Stageclear1 to the “Clear” state. Once added, test play to check that it plays.

  7. Finally, let’s add sound to the enemy. Go back to the Object view and open the “Enemy” visual script.

  8. Select the “dead” state and press “+ Add Executable Action”.

  9. Add “PlayAudio” with Sound Data: Blow1.

  10. It is added… but it is number 5, which means the sound would play after the object disappears, so it never runs. Let’s reorder it.

  11. Drag “PlayAudio” so it sits right after “Database | Enemy~~”, at position 2.

Part 9-2: Let’s Finish Up with “Effect” and “Particle” Polish!

Now that the sound is set up, let’s finish off with some polish using the “Effect” and “Particle” features.
An effect when you defeat an enemy and particles when you clear the game should make for nice polish.

  1. First, let’s import an effect and a particle from the official assets. Go to the Assets view and click “Import official assets”.
  2. Switch to the “Effects / Particles” tab, select the following two assets and “Import” them.
    Effects > E_002_attack_00
    Particles > P_011_fire_works
  3. Once imported, go back to the “Object” view and open the “Player” visual script.
  4. Open the “Clear” state and press “+ Add Executable Action”.
  5. Select Particle > DisplayParticle and click the “List” button for the particle object path.
  6. The fire_works particle you just added is there, so select it and press “OK”.
  7. Next, press the “Preview” button.
  8. Drag the orange crosshair in the “Preview” screen to just above the player. Fireworks go off every time you move it, so fine-tune while watching them, and once it is roughly in the position in the image below, press “Close”.
  9. Press “Add” to add it and you are done. Fireworks now go off on clear.
  10. Next, open the “Enemy” visual script.
  11. In the “dead” state, press “+ Add Executable Action”.
  12. This time select Effect > DisplayEffect and press the “List” button for the effect object path.
  13. Select E_002_attack and press “OK”.
  14. Effects can be adjusted in “Preview” just like particles, so press the Preview button and check. It looks like the position is already about right without changing anything, so just close it and press “Add”.
  15. “DisplayEffect” is added at number 6, but as before it comes after the object disappears, so let’s drag it into place.
  16. Drag it so it becomes number 3, just below “PlayAudio”.

Part 9-3: Let’s Play Through the Whole Game!

That should be everything a game needs. Let’s play it through from start to finish.

Part 10: Let’s Export the Game for Windows!

You should now have a basic jump action game, but as things stand only people who own ACTION GAME MAKER can play it. Let’s export it in Windows format so that people who do not own it can play too.

  1. From the “Project” menu in the upper left, choose “Export…”.

  2. The Export window opens. Choose “Windows Desktop” from “Add…” in this menu.

  3. Click the file icon to the right of the Export Path field on the right.

  4. A save-file window opens. Here you choose where and under what name to export the game you made. The location it opens by default is the project’s own folder, so let’s change it to a different folder.
    For example, creating a “Platform Tutorial Export” folder in My Documents is a good idea.

Why is exporting inside the project folder a bad idea?

Everything inside the project folder is loaded when the project opens and when the game starts. In other words, having export files in there causes unnecessary loading, which can slow things down or cause problems.
It rarely becomes a serious issue, but it is best avoided just in case.

  1. Once you have decided on the destination folder, enter “Jump Action Tutorial.exe” as the file name inside it and save. (You need to type the .exe as well.)

  2. Once the path is specified, the “Export All” button in the lower left, which was grayed out until now, becomes available, so click it.

  3. A window for choosing the export mode appears, so select “Release”.

  4. A progress bar appears for a moment and closes automatically — that means it is done. Open the folder you saved to in Windows. There should be two files: PlatformTutorial.exe and .pck. The .exe is the program and the .pck is the data; the two go together. If you distribute your game to someone, make sure to send both files.

    Tutorial9_08

  5. Try launching the .exe file. Just like in a test play, the game starts up and you can play it. Your game is complete, at least for now — congratulations!

In Closing

How was the tutorial?
It was probably a bit difficult, but you have now learned the basics of ACTION GAME MAKER: how to make a map, how to make an object, and how to build a visual script.

That said, you probably still have questions like:

  • How do I make a title screen?
  • How do I make that gimmick you see all the time?
  • How do I make a top-down game?

We have prepared advanced tutorials that cover these, so please take a look at those as well.

You can find the other tutorials in the table of contents!