Emanuele Feronato is one of the most prolific Phaser tutorial writers in the community, and this is a Phaser 4 update of an earlier Phaser 3 prototype he built to explore a specific kind of movement: a character walking on a floating platform where gravity is not fixed but instead rotates when the character reaches an edge.
Instead of falling into the void, the character smoothly transitions to the next side of the terrain and keeps walking, as if gravity itself were glued to the surface. The idea sits somewhere between classic platformers and games that play with orientation and perspective, and it is being developed further into a full platformer with multiple gravities.
What This Phaser 4 Platformer Prototype Covers
The prototype is a working, playable demo built with Phaser 4, TypeScript and Arcade Physics. You move with the left and right arrow keys and jump with the up arrow. Walk to the edge of the platform and instead of falling, the character rotates onto the next side and carries on.
The key idea is that movement is defined in surface space, not world space. At any given time, the character is walking on one of the four sides of the terrain, and gravity is always pulling toward the current surface. When the character reaches an edge, gravity is reassigned and the character rotates into the new orientation through a short tween. Arcade Physics remains fully in control throughout.
The tutorial covers how to handle input that works regardless of orientation, how to detect edges and trigger rotations, how to apply jumps relative to the current surface rather than in a fixed direction, and how to keep the character correctly aligned with the terrain through each transition.
The complete Vite project is available for download so you can run it locally and start experimenting straight away. Emanuele also offers a free minibook for those getting started with Phaser and TypeScript.

About Emanuele Feronato
Emanuele Feronato has been writing Phaser tutorials and HTML5 game development guides for years. His site covers everything from beginner fundamentals to advanced mechanics, always with commented source code and working examples. This planet gravity prototype is part of an ongoing series expanding toward a full multi-gravity platformer.
Read the Full Tutorial
Includes the working demo, full source code and the complete Vite project to download.




