In many arcade video games objects are flying across the screen (either vertically: falling objects, upcoming cars in car racing game) or horizontally (e.g. pipes in Super Mario or flappy bird, cars in Crossy Road).
In frame based games, motions is often implemented by positioning sprites on the screen using (x,y) coordinates and applying a velocity vector (Vx,Vy) to each sprite to indicate the direction and speed of the sprite.
Let’s review the algorithms used to implement three types of motions:
- Vertical Scrolling: Falling objects (e.g. Catch the Fruit game)
- Horizontal Scrolling (Right to left gliding pipes in Super Mario)
- Combination of both Vertical and Horizontal Scrolling in the game of Space Invaders
Vertical Scrolling: Falling objects
Horizontal Scrolling:
Space Invaders: Aliens Motion
–