Tutorial 1: Part 2

Creating A Player Actor

Hello again! Last time we made the map and the beginning of the project. This time we’re going to put some stuff in there.

Before we make the player “Actor” (the term SE uses for most interactive BOB/sprite entities) we need to create animations for him. SE animation files are called animstrips. Go into the Animations Tab (top left) in t SE and press + by Animations. (also top left) Call it snowmanwalk_r.animstrip and save it to the Sprites/ folder – this is important. As your game gets more and more graphics, the images listview will only display the .png files in the same folder as the currently selected .animstrip – so in a big project you’ll want to separate your images into themed folders (eg in my games I have players, weapons, enemies, effects etc!) this project is tiny though so no need for that.

With snowmanwalk_r selected click on the snowman frames 1-3 in the list. That inserts them into the timeline. You will have to drag each of these frames upward slightly in the preview window so that their X/Y is -8/-16 with the snowman standing ON the red line. The red line is the 0,0 point of the actor, imagine the red line is the floor. I know this is getting convoluted, but it’ll all click soon!

You can use the Play Button (and loop button) to preview the animation. Make sure Auto Flip is enabled at the right. The reason we called this animation Snowmanwalk_r is Scorpion intelligently knows what to do with animations with a _r or _l suffix, and should automatically enable auto flip. This means you don’t need two copies of each animation, one facing left and the other right – it sorts that out for you!

Now that we have an animation, let’s go over to the Actors Tab, and press the + in the top left. It will ask you to select an animation – Snowmanwalk_r – and then choose a location and filename. Lets call him snowplayer and put in in the Actors/ folder. The Actor Tab has a lot to it so try to copy what I’ve done in this screenshot.

  1. The Player tickbox (circled blue, top) should be on. This makes them controllable.
  2. Movement Type (top right circled green) should be set to Control_platform_Maryo – though feel free to try the different Control_platform types for different styles of jump physics.
  3. Tick Show Colbox in the top left (circled green) and move and resize the green rectangle in the preview window so that it fits like this. This is the box that the actor’s collision detection is based around.
  4. Copy the values highlighted by pink, this is all the jump/walk etc behaviour.

Okay phew. Now let’s put him in the map! Go over to the Maps tab and press “Edit Map” there. (don’t think you can just do it immediately in Tiled if you’ve left that open. Tiled currently won’t display the snowman in it’s actors list – so press Edit Map from the Maps tab to populate the actor list!)

In Tiled, where the tileset panel is you should have an Actors tab. Click on that. 

This actors palette is what you’ll use to place most of your players and monsters into the map. Put him wherever you’d like the player to start in the level. (you can put him on the “actors” layer (top right) if you want – it’s good practice, but it will still work whichever layer you place it on.

File/Save the map!

The final step is telling the project which level to load and display. Go to the Code Tab in SE and select the only codeblock in the left list – the Startup codeblock. Every project has this codeblock to initialise things. Codeblocks are where you store all of your game’s scripted logic, so is where you’ll be spending most of your dev time.

✅ Pressing the + in the top left of the codeblock view will create a new codeblock file, asking you where to place it. In recent SE versions every new codeblock has the “.codeblock2” extension. These are made of plaintext so you can technically edit them in any text editor.

Any commands can be added by pressing Enter Key or the + button (top left) to create a new line. You want a Display/CameraFollow command with only “Snap to Player” ticked. You want a Display/ConfigureScreen command with Y Res set to 192. (ignoring that I put 176 in one of the screenshots, oops!) Press the “(L)oad” command shortcut at the top, or press L on the keyboard. Select Level1 – ensure Auto Fade In is ticked.

Go back to the project tab and press “Run in WinUAE” (bottom left) … And after the scorpion splash screen you’ll get:

Depending on your emulation setup you should be able to control the snowman with arrow keys, or perhaps a joystick if you have one plugged in. Try jumping and dropping through the brown platforms, and jumping to the top of the level. Back in SE maybe mess around with the Snowman’s Actor properties to refine the player physics, and compile again?

Congratulations! You’ve made the beginnings of a game. Next time we’ll look at adding more snowman animations, adding enemies, lives, attacks, a title screen and score! You likely know enough already to tinker, see if you can figure out how enemies might work. CPU_platform is a good bet for their movement type… See you soon!

Leave a Comment

Your email address will not be published. Required fields are marked *