User Tools

Site Tools


notes:comporg:fall2023:projects:magx

This is an old revision of the document!


MAGx

Infinite Runner Game

An infinite runner involves a character moving along an infinitely long stage overcoming obstacles placed along the path. That's the foundation. Other additions can include an increasing speed, procedurally generated obstacles, etc.

Parallax Scrolling Background

A parallax background involves multiple layers scrolling along at different speeds to simulate depth. Layers farther back in the scene move slower than those closer to the camera.

Data Needed for Parallax

Each layer needs at least a X Position and Speed variables. On each frame, the X Position is subtracted by the Speed, so that the layer moves at a constant rate. Once the layer moves off-screen, increment its' X Position by the width of the layer asset so it's back on-screen and the scrolling effect doesn't have any cuts. (For simplicity, each layer asset is the width of the screen size.)

notes/comporg/fall2023/projects/magx.1698897346.txt.gz · Last modified: 2023/11/02 03:55 by walley