Skip to content
Docs

Your first model, step by step

A guide for editor 0.4.0. You draw a brick texture, build a cube robot, give it an animation, put it in a game, test it with the bot and export it.

DescribesEditor 0.4.0 For creating without programming

On this page

In this guide you use the asset workshop to make two things of your own and put them in a game: a brick texture for the floor and a cube robot that moves its head. At the end the bot tests the game and you export it to a .ggx file.

Every step of this guide was actually done in editor 0.4.0, and the screenshots come from that run. It takes about 20 minutes.

1. Create the game#

  1. On the start screen, press New game.
  2. Under How it is programmed, leave Rules or code. Under Kind of game, Third person.
  3. Choose the Collection template and type the name My first model.
  4. Press Create.

The game opens with a scene ready to play: you have to collect all the coins before time runs out, and the bot already knows how to win it. At the bottom is the Content browser, and at its foot the workshop buttons: Drawing, Model, Map and Assets.

The workshop buttons, at the bottom of the Content browser.

2. Draw a texture#

  1. Press Drawing.
  2. Under Name, type Brick.
  3. Under What you will draw, choose Repeating texture (64 x 64).
  4. Press Create.
A texture that repeats without visible edges.

The drawing opens in its own tab, Brick, next to the scene. So you do not start from nothing, use a recipe:

  1. Press Ready textures.
  2. Choose Brick. If you like, move Rows, Bricks per row, Mortar and Variation, or press Another like it.
  3. Press Use this texture.
The Brick recipe.

Now draw something on top, to make it yours:

  1. Pick a color in the palette, on the right.
  2. Press R (rectangle) or its button on the left.
  3. Drag with the mouse over the canvas, from one corner to the other.
The texture, with a stroke of your own.

If you do not like it, Ctrl+Z undoes it: it is the editor's own undo.

3. Export the texture and put it on the floor#

  1. Press Export.
  2. Press PNG image. If you also want to use it as a flat piece, press Sprite.
  3. Close the dialog.
PNG image for a piece's material.

The texture is kept in texturas/brick.png inside the project. To use it:

  1. Go back to the principal tab, the scene's.
  2. Click the floor to select it.
  3. In Details, Material category, choose brick under Texture (project image).
  4. Under Repeat, type 8: the image repeats eight times along the floor.
The floor, with your texture.

Draw, next to the texture, opens the drawing again.

4. Build a cube robot#

  1. In the Content browser, press Model.
  2. Under Name, type Robot.
  3. Choose the Empty 16 x 16 x 16 template.
Start empty.

The Robot tab opens with an empty grid. The body is built with the box tool, which fills a rectangle with cubes:

  1. Pick green in the palette.
  2. Press R (box).
  3. Drag over the floor of the grid, from one corner of a square to the other: a layer of cubes appears.
  4. Drag again on top of that layer, and so on until the body is as tall as you want. In the guide there are ten layers of 8 x 8.

The head goes in a separate part, so it can move on its own:

  1. Under Parts, press + and type Head.
  2. Pick yellow and, with the box, build the head on top of the body: six layers of 6 x 6.

The new part is attached to the first one, which the editor creates for you: if the body turns, the head goes with it. With the interface in English that first part is still called Cuerpo, its Spanish name. The status bar says how many cubes there are and the model's height: 1.00, against the game character's 1.80.

The robot: body and head.

5. Animate it#

  1. At the top, press Animate. It is the same robot, now with a timeline.
  2. Press + (New clip) and choose Empty clip…. Type Look.
  3. Drag the ruler's red cursor to the middle of the clip.
  4. On the timeline, click the Head row.
  5. Under rotation, type 45 in Y.

Changing a number leaves a key at that instant: the green diamond. Between the start and the key, the movement completes itself. Press the play button to see it.

The head turns and comes back.

6. Export the robot and put it in the scene#

  1. Go back to Model and press Export.
  2. The dialog says how many triangles are left, how much it weighs and how many clips it carries. Press Model.
  3. Close the dialog.
856 cubes end up as 24 triangles.

The robot is kept in modelos/robot.glb and shows up in Place pieces, under Project models:

  1. Go back to the principal tab.
  2. Drag the robot card from Place pieces to the viewport and drop it on the floor, to one side of the path.
The robot, at its natural size.

The robot comes in at its natural size. Now tell it which clip to show:

  1. With the robot selected, in Details, Model category, open Animation (clip shown while playing).
  2. Choose look · 1.0 s.
The clip shown while playing.

The scene view does not animate the clip: you see it when you play.

7. Play#

Before going on, change something else in the texture: open the Brick tab and draw another rectangle. Do not export it.

Press Play. Before starting, the editor exports what changed in the workshop and says so in the Console: "Before playing, 1 changed asset was exported into the game: Brick." You do not have to remember to export every time.

The match, with your texture and your robot.

Press Esc to go back to editing.

8. Test it with the bot and export#

  1. Press Test with bot (the robot icon, next to Play). The bot plays on the three difficulties, with two seeds each.
  2. When it says Test passed 6/6, press Export.
The bot wins with the robot in the scene.
The game, in a single file.

The .ggx carries the texture and the robot. The workshop documents (taller/) do not go in: they are the sources, and they stay in your project.

9. Look at the limits and the credits#

Open the Game card tab and scroll down to Package limits: how many models, textures and sounds the game carries, how much they weigh, how much the .ggx weighs and how many model triangles the scene has, each one against its maximum.

Below, Credits of imported assets lists the texture and the robot, with your name and the license propia (your own).

What your game weighs and whose each thing is.

What you did#

  • You drew a texture and put it on the floor's material.
  • You built a cube model with two parts and gave it a clip.
  • You placed it in the scene and chose the clip shown while playing.
  • You played: the editor exported only what had changed.
  • The bot won it and you exported it to a .ggx that the launcher opens.

Next#