Tiny Planet Physics


The Little Guardian is a mini game developed for Global Game Jam 2023, inspired by world setting of The Little Prince, and mechanic of Super Mario Galaxy.  Super Mario Galaxy is a very special game with a unique mechanic that I don't see much simular product in the whole platformer genre. The stage scene is filled with tiny planets that gravity is non-spheric. When player jumps around the world, the gravity changes rapidly based on Mario's position, and player needs quickly adapt it to reach desination.

Tiny planet is a interseting concept for me. It gives a fake feeling infinity as the character can run one direction continuously but he is actually limited in a small area. And i feel this behaviour gives quite a benefit to indie game project. Hence I decided to try this mechanic via this global game jam.

Draft in group chat during development

Draft in group chat during development

To make it work, you need to know there are 2 problems you need to solve: getting the gravity direction, controlling the camera direction.

The principle of getting the gravity is quite easy. You can imagine a zero-gravity space, with several trigger colldiers to trigger specific gravity algorthm.  For a planet, it should be a sphere field to point to the center. For a slope going up, it should be a cylinder field that pointing away from center. For the floating platforms, it should be just preset direction. If the character is inside more than two gravity field, only use the one with higher priority. And after you make the math works well, you can add some transition as a bonus improvoment

The direction control, however, is more complete. The character's movement is based on the camera view. But the camera moves based on the character movement. In my first try, I made the camera look at the character and only move if the character walk too far. It seems okay in the beginning. But after a while, The movement got lock in some situation. It seems if the character is too far, the cross product goes wrong, and my algorthm can't get the correct movement direction. So in the end, I decide to stick it with Super Mario, which locks character in the center (unless special custom area). 


The development is fun and I like the final result.  I think the system can handle the game in bigger scale, and probably doesn't limited to platfomer game. Concerning the project is inspired from The Little Prince, maybe I can make it to a RPG that you explore different tiny planets and chat with the lone residents.

Files

The Little Guardian.zip 72 MB
Feb 05, 2023

Get The Little Guardian

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.