<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Building_the_Vertical_Shooter_Template</id>
	<title>Building the Vertical Shooter Template - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Building_the_Vertical_Shooter_Template"/>
	<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Building_the_Vertical_Shooter_Template&amp;action=history"/>
	<updated>2026-04-09T07:07:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.shootemupkit.com/wiki/index.php?title=Building_the_Vertical_Shooter_Template&amp;diff=45&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;===Templates===   This tutorial explains how we built the ''Vertical Shooter'' template.  The template is included ready-made in the ''Shoot 'em Up Kit'' and you can Create...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Building_the_Vertical_Shooter_Template&amp;diff=45&amp;oldid=prev"/>
		<updated>2020-05-24T12:46:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Templates===   This tutorial explains how we built the &amp;#039;&amp;#039;Vertical Shooter&amp;#039;&amp;#039; template.  The template is included ready-made in the &amp;#039;&amp;#039;Shoot &amp;#039;em Up Kit&amp;#039;&amp;#039; and you can Create...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Templates===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial explains how we built the ''Vertical Shooter'' template.  The template is included ready-made in the ''Shoot 'em Up Kit'' and you can [[Create from a Template|create a new game using it as a starting point]].  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Build the Game===&lt;br /&gt;
&lt;br /&gt;
Create a new Empty Project&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Asteroids1.jpg|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give the project a name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select ''2D with models''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click the ''OK'' button to create the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Asteroids2.jpg|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the [[Level Editor|Level Editor]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Asteroids3.jpg|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The scene is empty except for a single directional [[Add a Light|light]].  A grid to help visualise the area is shown.  Because we selected to create a 2D game the objects we place will be placed on this plane by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Placing the Player'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Add a Player|Add a Player]] by clicking the [[File:ToolsMenu02.png|link=]] ''Player'' icon on the [[Tools Menu|Tools Menu]].  Select ''Sci-Fi Ship 05'' and place it in the level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the  [[Player General Tab|''Properties'']] window:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the [[Input Definition|Input Definition]], where it says ''None''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select ''4 Direction (XY) + Fire'' and click the ''OK'' button.  This will allow the ship to move in 4 directions (Up, Down, Left and Right) and Fire too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the [[Movement Definition|Movement Definition]], where it says ''None''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select ''Quadratic Axis'' and click the ''OK'' button.   This will allow the player ship to move with a subtle speed-up and slow-down as the player moves and releases the controller axis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Creating the Background'''&lt;br /&gt;
&lt;br /&gt;
''Layers''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create the background, we will use layers.  Layers are a simple way of adding items at different depths in the scene and are selected on the [[Tools Menu|Tools Menu]].  The 2D with models game mode still uses a 3D scene and so it is possible to have items closer or further away to the camera.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
{|style=&amp;quot;width:420px;border:none;&amp;quot; &lt;br /&gt;
|style=&amp;quot;width:200px;&amp;quot; |[[File:Vert1.png|link=]]&lt;br /&gt;
|style=&amp;quot;width:200px;&amp;quot; |[[File:Vert2.png|link=]]&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background-color:white;&amp;quot; |Layer 0&lt;br /&gt;
|style=&amp;quot;background-color:white;&amp;quot; |Layer 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The distance between layers can be adjusted using the ''Depth'' property on the Tools pane.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current layer is set using the ''Layer'' property on the [[Tools Menu|Tools pane]].&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
For our 1942 style vertical shooter we will use 3 layers:&lt;br /&gt;
&lt;br /&gt;
Layer 0 will be for the gameplay.  The player ship, enemy and bullets will all be on this layer.&lt;br /&gt;
&lt;br /&gt;
Layer 1 is slightly further away and so we will use this for clouds.&lt;br /&gt;
&lt;br /&gt;
Layer 2 will be our ground/sea level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Placing tiles''&lt;br /&gt;
&lt;br /&gt;
Select Layer 2 on the [[Tools Menu|Tools Menu]].&lt;br /&gt;
&lt;br /&gt;
Add a [[File:ToolsMenu01.png|link=]] [[Add Scenery|Scenery item]].  Select a water effect tile and place into the scene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Vert3.png|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In the [[Scenery General Tab|Properties Window]] set the pitch to 270 to make the tile vertical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Vert4.png|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In the [[Tools Menu|Tools Menu]] select ''Snap to Grid''&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
[[File:Vert5.png|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
We will now start filling the level with background tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Copy and Paste Clone''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the background tile selected, click the [[File:ToolBarCopy.png|link=]] copy button on the [[Tool Bar|Tool Bar]].  The [[File:ToolBarPaste.png|link=]] [[Paste and Paste Instance |Paste]] and [[File:ToolBarPasteInst.png|link=]] [[Paste and Paste Instance |Paste Instance (Clone)]] buttons will now become active.  Click the Paste Instance button to create a copy of the tile.  Because we selected the ''Snap to Object'' button the tile should align next to our original tile when you move it close.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We use [[Paste and Paste Instance |''Paste Instance'']] because a clone object takes all its properties from the original.  If we wanted to change the background in any way then we can select the original tile, make the change, and all the cloned tiles will be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Paste a clone to the other side of the original tile so that we have three in a row.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select all 3 tiles using CTRL+LeftClick on each of the tiles so that they’re all highlighted.  Select [[File:ToolBarCopy.png|link=]]Copy and then [[File:ToolBarPasteInst.png|link=]]Paste Instance.  Three new cloned tiles will appear and can be snapped above the original set of tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can repeat this to quickly and easily fill the level with background tiles.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Vert6.jpg|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Set the Camera'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new camera by clicking the [[File:ToolsMenu06.png|link=]] ''Camera icon'' on the [[Tools Menu|Tools pane]] and place it near the player’s starting location in the level.  You will see a green icon showing where the camera is targeting and you may also see a yellow model of the actual camera location.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Vert7.png|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
We can set the camera to follow the player or any other in-game item. For a classic vertical-scroller game we needn’t do this as the player can move around the screen independently of the Camera. However, we could use the tracking feature to ensure the camera remains a fixed distance from the player.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Vert8.png|link=]] &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Clicking the ''Tracking Entity'' property will allow us to select which item the camera will follow.  Select ''Player_1'' from the list.  Some new options will appear in the General properties window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can set the ''Tracking Distance'' property to control how far way the camera will be from the Entity.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[File:Vert9.png|link=]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will set the ''Tracking Style'' to ''Fixed Direction''.  This will leave the camera pointing in a single direction, which is very common in side-scroller games.&lt;br /&gt;
We don’t need to set any ''Target Offset'' values because we are using a fixed direction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Moving Camera'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vertical-scrolling style games are often set in a constantly moving level. We can achieve this by setting the Camera to move at a constant velocity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Movement Style'' property to ''Velocity''; and set the speed in which you’d like the camera to move using the ''Velocity X, Y and Z'' properties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add an [[Active Area|Active Area]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are now going to add an area of the screen that the ship can move around in.  The player will be able to move around freely in this area.  We will also make this area move upwards (the +Y axis) at a constant velocity so that the player will always be travelling along the level but still be able to move freely within the active area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add a [[File:ToolsMenu10.png|link=]] [[Add a Trigger|Trigger]].  A sphere will appear.  Place the sphere anywhere on the map and the ''Properties'' window will open.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Vert10.png|link=]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Shape'' to be a ''Box''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Name'' to ''Player Area''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ''Position'' and ''Size'' properties are set as a percentage of the screen.  We will allow the player to move within 40% of the screen width and 80% of the screen height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Position X'' to 50, which is the centre of the screen, and ''Position Y'' to 70, which is a little way into the bottom of the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Size X'' to 80, to give a lot of movement along the width of the screen, and ''Size Y'' to 40.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Vert11.jpg|link=]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the Player ship again.  You can either click the ship or use the [[File:ToolsMenu18.png|link=]] ''Select Item'' option on the [[Tools Menu|Tools Menu]] to select it from a list of all items in the level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the [[Player General Tab|General properties window]], click [[Active Area|''Active Area'']] to open a list of areas.  The Player Area which we’ve just created will be in the list.  Select the Player Area and the window will close and we’ll get two new options for our Area. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Side6.png|link=]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Leave the ''Area Movement'' property as ''Fixed'' because we want the area to remain fixed to a region of the screen (because we set it to be a screen-based trigger).  The level will scroll by, but the player will always be constrained to the 40% of the screen width and 80% of the screen height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Area Action'' property to ''Stop'' so that the player ship will stop if it reaches the limits of the active area. We could have the player wrap-around the area, or bounce off the edge, but classic vertical scrollers simply make the player stop at the edges of the active area.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[File:G4.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatically Moving Player'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Player is free to move around within the [[Active Area|active area]] and will be pushed forward if the player ship reaches the back ‘wall’ of the active area.  This method is used by some vertical scrollers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option is to automatically move the player upwards at the same speed as the camera.  We can do this using the Player’s [[Movement Definition|Movement Definition]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the Player ship by clicking it or using the [[File:ToolsMenu18.png|link=]] ''Select Item'' option on the [[Tools Menu|Tools Menu]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the ''Movement Definition'' property, which we set to ''Quadratic Axis'' earlier, click the ''Go to Definition'' arrow.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 [[File:Side11.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ''Quadratic Axis'' definition will open.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Vert13.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ''Velocity'' type is already set to ''Constant'', which will provide a constant velocity force to any item this definition is applied to.  In this example, it is the player ship.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the ''Velocity Y'' value to 20, which will match the value we set for the Camera.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click the ''OK'' button to close the window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A list of all the [[Movement Definition|Movement Definitions]] will open.  Close this list as we don’t want to work on any other definitions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test the Game===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click the [[File:ToolBarTestGame.png|link=]] ''Test Game'' or [[File:ToolBarTestLevel.png|link=]] ''Test Level'' icons on the [[Tool Bar|Tool Bar]] to test the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The player will now be moving at the same speed at the camera and so will not need to be constantly moved forward using a controller.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The player can move around within the bounds of the active area and the player can fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The player and camera will move slowly along the level.&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>