# Challenges of Designing Games in a Non-Euclidean Space

## Introduction

A coordinate system is a system that contains one or more numbers to determine the position of a point or other geometric elements on a manifold.

During the course of my UXG2176 — Advanced Scripting class, we learned about the importance of how a parent-child relationship between objects in the hierarchy will affect their values relative to the world and local space. Based on their position in the hierarchy, the translation, rotation, and scaling of an object may affect or be affected by another object. However, the object’s displacement in these situations may also vary depending on the coordinate system they exist on.

In this report, the following research aims to explore the challenges of designing games in a non-euclidean spatial system.

## Euclidean Coordinate System

Euclidean space is the fundamental space of classical geometry. Widely taught in mathematics, the study of geometry includes the notions of points, lines, distances, angles, and planes as part of its fundamental concepts. The Cartesian coordinate system is an example that adapts the use of Euclidean geometry.

While the Euclidean coordinate system was introduced for modeling the physical universe, it remains widely relevant in many applied disciplines such as physics, astronomy, and engineering. It is also the most common coordinate system used in the game development field, in areas such as computer graphics and geometry data processing.

## Hyperbolic Geometry

As opposed to Euclidean geometry which derives the geometric properties of objects in a flat plane, Non-Euclidean geometry is the modern mathematics projected onto curved or spherical surfaces, resulting in different rules and geometric properties.

According to Euclid’s fifth postulate, a pair of parallel lines will remain at a constant distance apart from each other at any given moment. This holds true in Euclidean geometry. Meanwhile, Non-Euclidean geometry does not obey the fifth postulate, as parallel lines do not exist in spherical spaces.

In Hyperbolic Geometry, lines appear to curve away from one another as they increase in distance away from the point of intersection with the common perpendicular. Hence, this may impose a challenge as objects that appear normal in Euclidean space may be perceived as stretched based on the angle they are viewed from in a Non-Euclidean space.

## The Fourth Dimension

Another form of a Non-Euclidean space is four-dimensional space (4D), an extension of the concept of three-dimensional space that we are familiar with. In the abstract of 3D space, it is observed that one only requires three numbers (x, y, z) to describe the size or location of an object in our everyday world. For example, the volume of a rectangular box can be found by multiplying the value of its length, width, and height.

On the contrary, the addition of a fourth dimension (w) introduces new methods of traversing through spaces that are incomprehensible within the rules of a 3D space. However, higher-dimensional spaces also bring about their fair share of problems, such as visualization. Similar to how a 2D entity is unable to perceive and comprehend 3D objects on the z-axis, the same can be said for us humans, who as 3D beings find it difficult to visualize the abstract and intangible fourth dimension. Nevertheless, the fourth dimension can be visualized, albeit partially, through the use of projection techniques such as cross-sections and clipping planes.

## Four-Dimensional Objects

Miegakure is a platform game in development in which the player explores four-dimensional space to solve higher-dimensional puzzles. The game plays much like a regular 3D platformer, except the press of a button will exchange one of the dimensions with its 4D counterparts. This allows for four-dimensional movement as the player explores the world similar to how a 2D being would explore a 3D space.

In Miegakure, the objects in the world are created in 4D. Similar to a cross-section, the game displays a 3D slice of the 4D object at any point in time. Upon moving or rotating an object, the game produces a different slice of the view, causing the object to deform as it changes shape and size. However, the issue arises as to how 4D objects are built when we are only able to view objects in 3D.

In 3D modeling, the surface of an object can be broken down into 2D triangles. Through the extension of this logic, the surface of a 4D object can be imagined as a 3D shape. By extending a triangle into 3D, it forms a pyramid-like shape, known as a tetrahedron.

Using the tetrahedron as a building block, Miegakure builds its 4D objects by stacking them on top of each other until the desired surface has been achieved. Although the results of this process may appear no different from a regular 3D object, there are many underlying tetrahedra below the surface of the object, invisible to the eyes if the object is opaque. While storing many hidden triangles in an asset model is bad practice in game development, it provides the computer with more geometric data to process and trim parts of the model. This allows the 4D object to work downwards and procedurally generate 3D objects with countless types of different-looking surface shapes.

## Summary

As the human brain perceives the world in 3D, video game spaces are modeled to reflect our expectations of reality. The rules of these spaces follow an invisible metric, and if broken, could risk breaking the immersion of the game.

Meanwhile, games designed in a Non-Euclidean space have to face the challenge of a different spatial system that humans are not familiar to begin with. Hence, games such as Hyperbolica and Miegakure have to spend a long time in development to perfect their spatial system before they are even ready to be shipped out for testing.

In conclusion, while there are many types of projection techniques to choose from for designing a Non-Euclidean game, each method of projection will compromise at least one of the distance, angle, area, or shape of the game. Thus, it is important to have a strong visualization of the space that we are designing before starting on development.

--

--

--

## More from Hughes Yip Liren

Technical Designer | Game Developer

Love podcasts or audiobooks? Learn on the go with our new app.

## Hughes Yip Liren

Technical Designer | Game Developer