Difference between revisions of "Side Scrolling Game Tutorial"
From Shoot Em Up Kit
(Created page with "==Method 1: Scrolling Background== In Level Settings in the Tools Menu you can set a background sprite to move horizontally at a set s...") |
|||
Line 51: | Line 51: | ||
− | [[Add a Player | Place a player]] in the scene and rotate it to point horizontally using the [[Gizmos | Rotate]] tool [[File: | + | [[Add a Player | Place a player]] in the scene and rotate it to point horizontally using the [[Gizmos | Rotate]] tool [[File:ToolBarRotate.png|link=]]. You can choose a side-on view or a top-down view, as shown here. |
Latest revision as of 18:38, 24 May 2020
Method 1: Scrolling Background
In Level Settings in the Tools Menu you can set a background sprite to move horizontally at a set speed as shown:
Click Edit Background Settings
Select Sprite Background:
Set the Movement property to Scroll -X:
You can then use a fixed camera and move the player up/down/left/right on the screen.
Method 2: Scrolling Scenery
This is similar to the Scrolling Background method but instead of a background sprite you add NPCs as background scenery items and set the AI to move in the –X direction as shown:
Method 3: Moving player
Place a player in the scene and rotate it to point horizontally using the Rotate tool . You can choose a side-on view or a top-down view, as shown here.
In the In the Define menu, click on the Movement Definition and select Velocity +X
Next scroll down to Velocity and set X to the required constant speed, which is the speed the ship will move even without joypad input. This makes the ship move steadily across the level.
Select the Player ship and set the Movement Definition to the Velocity +X definition we have just modified.
Next we can place NPCs and change the AI to from Chase to Move –X
Next we can place scenery items. In this example we have added some background tiles.
Next place a camera and set it to follow the player as shown:
This is a simple horizontal scrolling game that you can build on to make a more complex game.