TUTORIAL ONE
You start TommyGun by selecting either Start Menu | Programs | TommyGun and then the TommyGun application icon or the TommyGun icon on the Desktop.
These will launch TommyGun and display the following screen.

This is the start up screen and it allows you to open recently used projects, open existing projects or to create a new project.
For this tutorial we will open an existing project to simply highlight a few features of TommyGun before we get started on creating a game.
You can open a project file in many ways, by using the File menu and selecting Open or by pressing Ctrl + O or by clicking on the Open Project button on the start up screen. Click on the Open Project button to start the process of selecting a project file. The following dialog should appear.

This is the Open Project dialog and it allows you to select a project file to open. Double click on the SabreWulf folder to open it and then select the project.xml and click the Open button. This will load the project into TommyGun.
TommyGun will go through the process of loading its editor components. These editors allow you to create and edit different types of game resources. Currently TommyGun has 3 editors available which are an Image Editor, a Map Editor and a Code Editor. Once all the editors are loaded the project is loaded and you are presented with the default editing view.


This is the main view of TommyGun. TommyGun is broken into several main areas. The first is the red area which contains the main menu and main toolbar. The second is the yellow area which contains the Chooser bar, which is used to change the active editor. The third is the green area at the bottom of the window which contains the status bar. The forth and main area is the blue area which contains the active editor view.
The main menu and toolbar
These are used to select common application operations such as file operations, copying and pasting, undo/redo and the application options.
The chooser bar
This bar contains the buttons for each editor. You can change the currently active editor by clicking on its icon button. You can also change the active editor by using the keyboard either by using Ctrl + F1, Ctrl + F2 or Ctrl + F3 for the first 3 editors. When more editors arrive you can simply press the function key relative to that editor’s position in the list. You can also use Ctrl + Tab to move to the next editor and Ctrl + Shift + Tab to move to the previous editor
The status bar
The start of this area shows the application hint messages. The icons in the middle show the currently loaded editors. You can change to any of the editors by clicking on its icon in the list. The right of this area shows information related to the active editor within the 3 information slots on the end of the status bar. This information changes when you change editors.
The editor view
This is the main view allocated to each editor. When you change the active editor, the old editor will be hidden and the new editor will appear here. Currently shown is the Image Editor which is used to create sprites, tiles and screens.
Ok so we have a project loaded and we have 3 editors at our disposal. So what can we do?
Firstly we will investigate the Image Editor looking at the Screens, Sprites and Tiles associated with the SabreWulf project. We will then move onto the next editor, the Map editor and view the SabreWulf map and then onto the Code editor to see how all these images and maps are converted to code and a game created from the code.
This editor is used to create graphics. It contains tools to allow you to create and edit images. These tools include selection of part or all of an image, draw free hand, lines, spray can, filling, text, rectangle (unfilled and filled), ellipse (unfilled and filled). You can shift, scroll, rotate, mirror or flip a selected area of the image. The shift and scroll operations can be done at 1 pixel or 8 pixels at a time and with or with a wrapping (scroll) effect.
![]()
The tabs to the right of the editor view show the types of Images you can create and edit. The list under each tab shows you the list of images that you have created of that type. Currently under the screens tab shows the sabre_wulf screen. Click on it to view it in the editor.
You will by presented by the following screen.

Select the Settings tab and click on the first check box (Center the Image in the Edit Window), this will center the image in the main view.
The image is still a little small so resize the application to make the image automatically resize to take up the available space. You should end up with a screen similar to this.
Playing
with SpritesOk, now let’s look at a sprite!
Select the Sprites tab and select the first
item in the image list. (SabreManWalkLeft). This will replace the screen image
with a big sabreman image. Clicking on the
grid
icons on the toolbar will turn the character grid and pixel grid on, so try that
and you should have a screen as follows.
Now let’s see it animate!
Click on the loop animation
button
onto the toolbar under the image list. This will make the animation loop.
Next click the play
button
this will start the sprite animating.
It only animates in the little window under the list at first. So now try checking the checkbox labeled “Show Animation in Editor”
WOW! Now you should see it animating in the main view.
You can also turn the grids off by clicking the respective grid icons on the toolbar.
Ok, so that’s shown us how to view sprites, select them and start the animation playing. We’ll cover creating and editing sprites in the second half of the guide when we start to make a game.
So let’s move on to the Tiles.
Tiles are graphics that are used mainly to create backgrounds for the
screens in a game. In our case they are used to create the map elements for the
SabreWulf game.
So let’s start by changing to the tiles tab, and selecting the Pond00 tile from the images list.
This is a pond tile from the SabreWulf game. You can try selecting the other tiles to see the range of images used to create a screen for the SabreWulf map.
You should notice that tiles are not like sprites, in that they do not have multiple frames associated with them. Like screens, tiles are a single frame image. This is an important distinction between a tile and a sprite.
Ok, so once you have finished looking at the tiles, let’s move on the Map Editor where the tiles are used to create the map.
To make the Map editor active click on the map icon
in the chooser bar. This will change to the Map view.
You should see a big map and no selected screen such as the one below.
The upper window (white area) is the main screen layout window and the lower window (with the graphics in it) is the map layout window.
The Screen Layout window allows you to place, move and remove tiles to create a new screen.
The Map Layout window allows you to decide where to place a screen relative to another one. You how ever do not have to create a perfectly square map such as the SabreWulf example, this map just happens to present this way.
Ok, so let’s select a screen!
Move the mouse into the window with the map and the selection rectangle will move along where the mouse moves select a screen and select it by clicking the left mouse button. You will see the screen appear in the upper edit window. The screen layout view won’t be fully seen, so move the mouse cursor over the bar between the 2 windows and it will change the mouse cursor to a new cursor. You can now resize the portion of each window. You can also minimize or maximize a window by click on the minimize and maximize buttons in the top right hand corner of each windows title bar.
Try maximizing the screen layout window so you can view the entire screen.
Notice also each window has a plus and minus button, try each one to see what effect it has on the window.
One last thing when you have the mouse in either window you can hold the right mouse button and move the mouse to scroll the view around the window so you can see other parts of the screen or map. This only works when you have scrollbars appear in either window.

This is where you turn the resources you create in the first 2 editors into source code. TommyGun currently only supports creation of assembly code data.
The SabreWulf project comes complete with some assembly already written for the start of a game. But before we get into that let’s that a look at the editor and how to use some of it.
Firstly change to the editor by clicking the keyboard icon in the chooser.
By default the editor will display the first file within the Project File List, which in this case is SabreWulfGame.asm.
Before we can try this project out using an emulator, we need to be able to convert the source code into binary code using a compiler or assembler.
To do this we will setup an assembler to assemble the source code for us.
We’re going to install the Pasmo assembler, because that is the assembler this source code is targeted at.
You can get Pasmo from here.
So select the settings tab on the right side of the Code editor window.
On the Builder Properties group under the compiling section there is an assembler text box, click the button with the 3 dots (…). This will open a Find an Executable dialog. Find your version of Pasmo.exe and select it. Mine for example is under D:\Spectrum Programs\Pasmo\pasmo.exe.
We’ll leave the Compiling Parameters as they are because they are set correctly for Pasmo.
Next we’ll install an emulator.
This is similar into installing the assembler, except we change the Executing | Emulator parameter. So scroll the panel down, using the scroll bar on the side of the panel. Click the button with the 3 dots (…) and find your emulator. We’ll use ZX Spin, but you should be able to use pretty much any emulator you like. My emulator location is D:\Spectrum Programs\Spin\ZXSpin.exe.
Ok, now we have installed an emulator as well as an assembler, so let’s build the project and run it!
You can get Spin from the World of Spectrum site.
To build the project click the
Build
All Files button on the toolbar. This will start the compiler and if all goes
well it will compile the source code. You can see the compile progress in the
console window under the source code window.
It should read something like this
Building file – SabreWulfGame.asm
Loading file: SabreWulfGame.asm in 0
Loading file: sprites.inc in 1451
Finished loading file: sprites.inc in 4519
Loading file: tiles.inc in 4527
Finished loading file: tiles.inc in 7007
Loading file: map.inc in 7015
Finished loading file: map.inc in 8605
Finished loading file: SabreWulfGame.asm in 8651
Entering pass 1
Pass 1 finished
Entering pass 2
Pass 2 finished
Build Complete
This indicates the build succeeded.
So now we can run the project!
Click the Play button
on the
toolbar. This will launch the emulator and in our case ZX Spin. It will
automatically load the generated .tap file into ZX Spin and ZX Spin will run it.
If you use ZX Spin or Speculator you should see sabreman standing in the
SabreWulf jungle. You can move him around using the Interface II keys of 6 –
left 7 – right 8 – down and 9 – up.
Well that concludes our first tutorial of TommyGun. We learnt how to load an existing project; how to view the different resources of the project; to finally being able to build and run it. Next we’ll create a small game.