<?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_Side_Scroller_Template</id>
	<title>Building the Side Scroller 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_Side_Scroller_Template"/>
	<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Building_the_Side_Scroller_Template&amp;action=history"/>
	<updated>2026-04-09T08:49:38Z</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_Side_Scroller_Template&amp;diff=44&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;===Templates===   This tutorial explains how we built the ''Side Scroller'' template.  The template is included ready-made in the ''Shoot 'em Up Kit'' and you can Create fro...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Building_the_Side_Scroller_Template&amp;diff=44&amp;oldid=prev"/>
		<updated>2020-05-24T12:45:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Templates===   This tutorial explains how we built the &amp;#039;&amp;#039;Side Scroller&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 fro...&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 ''Side Scroller'' 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;
'''Modify the End of Level Conditions'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make the game easier and quicker to test, we’ll first remove the ''End of Level condition'' that all enemy can be killed.  This condition prevents us from testing a level until there is at least one enemy.  So, we will remove it for now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Level Settings by clicking the [[File:ToolsMenu16.png|link=]] ''Level Settings'' icon on the [[Tools Menu|Tools Menu]].&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Side1.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clear the ''All Enemy Killed'' checkbox in the 3rd column.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we’re ready to start building our level and, once we’ve [[Add a Player|added a player]], can test the game at any point by clicking the [[File:ToolBarTestGame.png|link=]] ''Test Game'' or [[File:ToolBarTestLevel.png|link=]] ''Test Level'' icons on the [[Tool Bar|Tool Bar]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add some background tiles'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Layer'' to 2 in the [[Tools Menu|Tools Menu]] so we can add some background tiles behind the player&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add a [[File:ToolsMenu01.png|link=]] [[Add Scenery|Scenery item]].  Select ''Tile – Tech 02'' and place into the scene.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Side2.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set ''Rotation Pitch'' to 270 in the [[Scenery General Tab|properties window]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Level Editor#Moving Around the Level|Zoom out]] using the mouse wheel so that you can see more of the level.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select ''Snap to Object'' in the [[Tools Menu|Tools Menu]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy using the [[File:ToolBarCopy.png|link=]] copy icon on the [[Tool Bar|Tool Bar]] (make sure the tile is selected).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Paste a Clone using the [[File:ToolBarPasteInst.png|link=]] Paste Instance icon on the [[Tool Bar|Tool Bar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you’ve pasted three in a column select them all (CTRL+Click) and [[File:ToolBarCopy.png|link=]] copy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ToolBarPasteInst.png|link=]]Paste Instance to paste all 3 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Side3.jpg|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Add a Player'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Layer'' to 0 in the [[Tools Menu|Tools Menu]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Turn off ''Snap to Object'' in the [[Tools Menu|Tools Menu]] &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 01-B'' 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;
Set ''Rotation Yaw'' to 90.  ''Pitch'' to 0 and leave ''Roll'' at 0.&lt;br /&gt;
&lt;br /&gt;
Select an [[Input Definition|Input Definition]].  Choose ''4 Direction (XY) + Fire''.&lt;br /&gt;
&lt;br /&gt;
Select a [[Movement Definition|Movement Definition]].  Choose ''Quadratic Axis''.&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.  Later, we will make this area move to the right (the +X 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:Side4.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the ''Shape'' to be a ''Box''.&lt;br /&gt;
&lt;br /&gt;
Set the ''Name'' to ''Player Area''.&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;
Set the ''Position X'' to 30 and ''Position Y'' to 50.&lt;br /&gt;
&lt;br /&gt;
Set the ''Size X'' to 40 and ''Size Y'' to 80.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:Side5.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 side-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;
'''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:Side8.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 side-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;
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:G5.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.  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;
Side-scrolling style games are 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;
[[File:G8.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The camera will now move in the X direction while the player is free to move around in the active area which is contained within the screen.&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 side-scrollers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option is to automatically move the player forward 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:Side12.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 X'' 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>