blog post

The Galaxy Project

A procedurally generated galaxy simulation built in Roblox.

May 12, 2026

Updated May 21, 2026

Jump to

The Project

Galaxy is a procedurally generated galactic simulation created with the intent to demonstrate technical proficiency and game design talent. Its aim is to create a sense of realism regarding the creation of scale, movement, and discovery in a game engine that wasn’t necessarily built for the purpose of simulating space.

My priorities included three main objectives: beauty, believability, and scalability. Everything was supposed to look incredible on an aesthetic level yet still be based in mathematics at the same time. Movement had to be fluid and clear. Generation needed to be instantaneous enough for me to allow the galaxy to grow organically and without interruptions.

What’s more important to me, however, is for this project to have a strong sense of authorship behind it rather than mere randomness. Sure, much of the universe will be generated procedurally, but there will still be room left for authorship in the project.

The Tech

Galaxy features a procedurally generated map of star systems; each system features anywhere from one to six stars in various orbits, chaotic, stable, and beyond. Systems also feature anywhere from zero to twelve planets of varying types orbiting all or some of the present stars.

Built using Native and Parallel Luau, Galaxy is capable of generating astronomically large amounts of systems very quickly. Current benchmarks indicate Galaxy can generate ten thousand systems (an average of sixty thousand planets and nineteen thousand stars) in about a second. Speeds this great allow for nearly infinite expansion at runtime.

Migrating away from traditional Roblox engine time-keeping allowed for the implementation of simulation speed controls. Players can set the simulation speed to anything between zero and ten thousand times normal speed. Planets, stars, orbits, and all simulations will change accordingly and smoothly. The system also automatically detects desynchronization and floating-point precision errors and will make smooth adjustments when necessary.

expOrbit

More complex systems use parametric equations to generate and render their orbits. I needed a way to dynamically create, edit, and preview these equations. Sure, I could just write them all out in Luau, then load the game, but that workflow gets tedious fast. Even minor changes to the equation meant going back to the source, editing it, reloading the game, and checking whether the results actually looked right.

That cycle didn’t work for me. Galaxy is just as much a visual demonstration as it is a realistic one. Everything needed to look perfect, thus requiring many iterations to achieve the perfect result. I wanted to be able to explore, test, and apply each change directly.

The solution was creating a domain-specific language that the user could edit, compile, and execute at runtime.

So I created expOrbit: a math-first DSL used for generating, rendering, updating, and designing orbits. Instead of hardcoding every path in Luau, I could describe an orbit as a set of expressions, evaluate those expressions over time, and immediately preview the result. This had the added benefit of allowing the generator to create expOrbit equations by itself.

Check out expOrbit’s developer documentation.