Slide Control
Slide control is a method of control used in slide shooters such as Space Invaders and Galaga, where the player object slides across the screen and cannot leave the screen. Slide control is not restricted to left-right sliding as some games use slide control vertically.
Steps
1. Input and movement
Input and movement are directly tied. If input is detected, the player object is moved immediately after without any regard to collisions or whether or not it has moved off the screen.
Screen Cage
A screen cage is then used to restrict the horizontal location of the player object to a minimum and maximum value, usually the sides of the screen.
Pseudocode
| comment | screen assumed to be 800 pixles wide |
| comment | detect input and move |
if left_key then player_object.x = player_object.x - 1
if left_key then player_object.x = player_object.x + 1
| comment | screen cage |
if player_object.x < 0 then player_object.x = 0
if player_object.x > 800 then player_object.x = 800
| This article is a stub. You can help improve Game Design Novice by expanding it. |
page_revision: 1, last_edited: 1204169124|%e %b %Y, %H:%M %Z (%O ago)