rellax version 0.1.4 Get Latest Release rellax.scm |
GitHub Repo |
Demo Windows |
Demo Linux |
Download project .zip Rellax while the camera tracks with cool parallax
This module uses the camera and Viewport API from Adventure Game Studio 3.5.0.Demo game uses keyboard arrows control, up arrow jumps. WASD should also work.
UsageBefore starting, you must create the following Custom Properties in AGS Editor, for usage with Objects.
Just click on
Properties [...] and on the
Edit Custom Properties screen, click on
Edit Schema ... button, and add the two properties below:
PxPos:
- Name: PxPos
- Description: Object's horizontal parallax
- Type: Number
- Default Value: 0
PyPos:
- Name: PyPos
- Description: Object's vertical parallax
- Type: Number
- Default Value: 0
The number defined on
Px or
Py will be divided by 100 and used to increase the scrolling.
An object with
Px and
Py 0 is scrolled normally, an object with
Px and
Py 100 will be fixed on the screen despite camera movement.
Objects with negative
Px and
Py are usually at the front, and positive values are usually at the back.
Script APIstatic attribute Character* TargetCharacterThe character being tracked by the Game.Camera.
static attribute bool EnableParallaxGets/sets whether Parallax is on or off.
static attribute bool EnableSmoothCamGets/sets whether Smooth Camera tracking is on or off.
static attribute int CameraOffsetXGets/sets the camera horizontal offset.
static attribute int CameraOffsetYGets/sets the camera vertical offset.
static attribute int CameraLookAheadXGets/sets the camera horizontal lookahead offset. This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).
static attribute int CameraLookAheadYGets/sets the camera vertical lookahead offset. This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).
LicenseThis module is created by eri0o is provided with MIT License, see
LICENSE for more details.
The code on this module is based on the code of Smooth Scrolling + Parallax Module from Alasdair Beckett, which bases on code from Steve McCrea.
The demo game uses CC0 (Public Domain) art provided by
jetrel.