top of page
image4.png

Prismagica is a personal project that I developed in my own time using Unity.

 

Prismagica is a 2D puzzle game set in an abstract world. I explored mechanics involving physics and rotating the world, along with the development of some editor tools to aid in it's development.

Gravity

The primary mechanic in Prismagica allows to the player to explore the world, manipulating gravity as they walk. This is achieved by aligning gravity and the player's rotation with whichever surface happens to be underfoot.

 

This is performed using physics raycasts. By raycasting under the player I am able to detect the colliders attached to surfaces. The generated hit results provides us with the surface normal vector, which is used for gravity.

ezgif.com-gif-maker (43).gif
ezgif.com-gif-maker (42).gif
Camera Demo
Unity_jP8fOPeAgi.png

Camera System

The world of Prismagica can be very confusing with how much it rotates. To assist the player with navigation and direct the player's attention to certain things, I wrote my own camera system.

​

The camera is controlled by a priority system, with different targets having their own priorities. Whichever target has the highest priority is able to influence the camera with various modifiers. Serving as a base target the player is at the bottom of the priority system, ensuring the camera will have predictable default behaviour. The system allows for different targets such as focus zones to be added or removed from the priority system at runtime.

Report
Locate

Reporting

Prismagica's world was going to be large, and to make collaboration with my artist / level designer easier, I created a tool to easily add notes on bugs, glitches, and general comments to the world.

​

A popup window shows up with the press of a button and a note can be created all during gameplay.

​

Another editor window shows an overview of notes in the project with a button to automatically navigate to the relevant location in the corresponding scene.

Teleport
image8.png

Asset Pipeline

The asset pipeline has gone through multiple stages in this project.

 

Early Prototyping

During early prototyping the focus wasn't on performance. My artist had experience with certain software and I just wanted the assets she created to work in the game, to get an idea of how the game would look and feel.

​

Steps to create levels were:

  1. Draw the level in rasterized 2D software.

  2. Convert rasterized graphics to vector graphics (SVG) in InkScape.

  3. Convert SVG graphics to a 3D model in Blender.

  4. Import the 3D model in blender.

​

This approach had two problems, first, each program used in the pipeline required specific settings to create the desired result in the game, these were settings such as brush size when drawing, document resolution in InkScape, and scale in Blender.

second, the resulting models in the game had millions of polygons and often had to be cut into smaller pieces to work around performance and polygon restrictions.

Unity_MGtyhQAmcd.png

Current Situation

Current steps for getting assets into the game are less complicated but still difficult to work with.

 

Steps to create levels are:

  1. Draw the level in rasterized 2D software.

  2. Use a custom conversion tool to turn this art into vector graphics.

  3. Use these vector graphics directly in Unity through a largely abandoned open source plugin for Unity.

​

While the current solution made the pipeline process of getting assets into the game easier by removing InkScape and Blender, results are still inconsistent and every change to level geometry requires walking through the entire process again.

​

Performance and polycount are much better with this approach, as the assets are now 2D images with a 2D collider, but the unity plugin imposes restrictions that require workarounds such as small holes in the colliders for them to work. These in turn can cause unexpected behavior such as bugs in the gravity system.

Curve Editor Sketch

Future Plans

The current system is a step in the right direction, but more of a band-aid fix than something to build an entire game on.​

​

My plan for the future is to rework the geometry of this game to be generated in-engine based on splines created with in-editor tools.

​

Benefits of this approach will be:

  1. No need for external tools.

  2. in-engine level design, greatly improving how much you can iterate on level design.

  3. Smaller objects in the scene, allowing them to be culled by the renderer for performance.

  4. Better control over the resolution and smoothness of curving lines.

bottom of page