Play test a character
A play test moves your character in a small game world, before you put it in your game. You see if the clips, the pivots, the scale, the speed and the hair motion are correct. In this guide, you play test the sprite of Make a sprite.
Add the node
- Add a Play Test node from the Play category.
- Link the output of Combine Sprites to Sprites. For a 3D model, link the model to Model.
A Play Test node with a sprite linked to Sprites guides/play-test-node
You can link more than one sprite to Sprites, such as a body and a sword. The first sprite draws at the back.
Pick a preset
Click the Play Test node. In Params, set Preset:
| Preset | Plays | The game |
|---|---|---|
| Top-down (2D) | Sprites | You walk in a wood, seen from above. |
| Side-scroller (2D) | Sprites | You run and jump on a street, seen from the side. |
| Billboard (2D in 3D) | Sprites | Your sprite walks and jumps on grass in 3D. It turns to the camera. |
| Third-person (3D) | Model | Your model walks, runs and jumps on grass. The camera follows it. |
The node shows the character in its idle clip.
guides/play-test-paramsPlay
- Click the Full screen button on the preview of the node.
- Click the game. Now the game gets the keyboard, the mouse and the gamepad.
- Move with WASD, the arrow keys or the left stick. Run with Left Shift. Jump with Space.
- Push
Escapeto stop. PushEscapeagain to close the preview.The open Play Test preview with the knight on the sci-fi street guides/play-test-play
Each world has a test area: steps of different heights, slopes, a gap and a wall. Use it to see if the character is the correct size.
Change the controls and the clips
Controls has one action on each line. Animations gives the clip of each state or action.
move = WASD, Arrows, LeftStick
jump = Space, PadA
attack = Mouse1, PadXidle = idle_{dir}
walk = walk_{dir}
attack = attack_{dir}- A clip name is the Clip that you typed in Generate Sprite.
{dir}is the direction that the character faces:up,down,leftorright.- Turn on Mirror left to play the
rightclip, flipped, when the character faces left. - A new action, such as
attack, plays its clip one time.
If a line is not correct, or a clip is missing, the preview shows a message.
tip
Turn on Show colliders and Show pivots to see the size of the character and the point that it stands on.