I have created a video to show you how easy it is to create great scrolling layers for your game in less than 3 minutes (including me making mistakes).
The basic components of the parallax engine are four fold:
- the engine itself
- the layers
- the camera
- the scrollers.
The enigne co-ordinates the layers by using the camera and the scrollers.
The layers represent a repeating background. The background posistion can be modified by the scrollers.
The camera represents a view on the world, where ever the camera is the engine will know how to convert the posistion of the layers correctly so that the scrolling still works.
[[posterous-content:EdaIBFGhrICeEvasgnlJ]]The demo film shows first how to create a simple scrolling layer that scrolls left to right, then later on in the video it shows how a developer can add more effects to the backgrounds, such as simple scrollers combined with an oscillator.
All of this was done with no code required!
I am always looking for suggestions on how to improve this project, so any feedback would be greatly appreciated. You can leave feedback here, or on the forum [Discussions]
I lead the Chrome Developer Relations team at Google.
We want people to have the best experience possible on the web without having to install a native app or produce content in a walled garden.
Our team tries to make it easier for developers to build on the web by supporting every Chrome release, creating great content to support developers on web.dev, contributing to MDN, helping to improve browser compatibility, and some of the best developer tools like Lighthouse, Workbox, Squoosh to name just a few.