For my thesis, I recreated the "gravity field" system from the game Super Mario Galaxy in my own engine, which uses vector field equations to determine the direction of gravity at any position within the field. In addition to the gravity field system itself, my thesis features a wide variety of different planet types of different shapes that can be spawned in the world through a UI menu, each with their own collision algorithm, and a 3D platformer player character designed to navigate across these different planets, with a focus on intuitive and fun controls and physics.
Unlike a standard platformer with global, downward gravity, gravity in this thesis is determined by gravity fields that surround each planet. Each planet type has its own field type, which a vector field equation that determines the direction of gravity based on the player's current position within the field. The player is only affected by the field belonging to the planet they're closest too, allowing them to seamlessly jump between planets. As the player can be at any arbitrary orientation, a special movement algorithm was created which projects the k-basis (up vector) of the camera in order to determine a reasonably intuitive movement direction for the player at most orientations.
This thesis features 12 different planet types, specifically 8 primitives, and 4 loaded models. Each primitive planet type has its own collision algorithm and matching gravity field type, and multiple customizable parameters. Each model planet uses a per-triangle collision algorithm that works for any arbitrary model, and which is performant even with many model planets loaded at once. Model planets reuse gravity field types from the primitive planets which intuitively match their shape.
While the thesis loads with an existing set of planets loaded in (used as a course for playtesting), new planets can be spawned in using an in-game menu made with the ImGui library. This menu allows the player to adjust the parameters of the planet to be spawned, including the type, position, orientation, color, and size parameters (which vary by planet type). Additionally, the player can adjust parameters for the planet's gravity field as well. While using the menu, a preview of the planet to be spawned will be visible within the world, so as the player changes the parameters, they can see how it would affect the planet in real time.
To aid in navigation and provide fun, interesting movement options, a variety of jump types can be performed, based on jump types from Super Mario Galaxy. This includes a back flip, which grants greater height than a standard jump, a long jump, used for crossing long horizontal distances, a triple jump, in which the player's jumps gain height by jumping in succession, and a wall jump, which allows the player to jump between opposing vertical surfaces. These different jump types also feature simple programmatic animations, in order to provide feedback and improve game feel.
As one of the goals of my thesis was to create a fun and intuitive end product, playtesting sessions were held with volunteers in order to gather data, find bugs, and evaluate the current state of the project. Each playtester played through a premade playtesting course, and then filled out a survey about their experience afterward. The results of these playtests showed that the majority of players found the experience fun and intuitive, especially those who had played Galaxy before.