MY WORK IN SHORT
Planets Procedural Generation
Linear Congruential Generator for Randomization
Beziers Curves for smooth little animations
Pathfinding around an icosphere
Noise
![](https://cdn.myportfolio.com/8671dc29-dedb-4573-aae9-21809611a132/92a98f10-3789-45d3-aacc-8e65462b13b3_rw_1920.png?h=0f655e914f5f28e4649e1eb3f93b95c1)
![](https://cdn.myportfolio.com/8671dc29-dedb-4573-aae9-21809611a132/d84f0b38-b240-4016-9121-0e1c7ace634b_rw_600.png?h=019cd997968ed51dad28f6a972661257)
- Let's create a beautiful galaxy! -
Icosmos is a mini video game project based on planets procedural generation I've been working on with a friend during a week. It's made on Unity and we both coded on this project.
Interested about it? Check my friend's video about our work!
Every asset used in the game has been produced by my friend and I.
PLANETS GENERATION
Every planet generation follows the same logic. First, we create the default icosphere (12 points, 20 faces). We then proceed to subdivision according to the precision wanted: we create 4 new triangles from every initial faces.
Then, we have to elevate some faces according to a 3D Noise to make the relief. We have to make sure to join the triangles elevated at the same height.
Last thing to do is to join every face to the ground if needed!
Every planet is defined according to a seed, making it possible for players to regenerate a planet they particularly liked. We created our own pseudo-random generator to make it possible without using the one given by Unity. This is a Linear Congruential Generator providing up to 2^32 unique planets.
PATHFINDING
Our pathfinding follows the A* search algorithm. I implemented it to make a character locate the shortest path from its position to the targeted one. I just had to calculate its rotation to make it looks like it's standing on the planet whatever that planet rotation is.
BEZIERS CURVES
Building a rocket allows the player to generate a new planet. In order to make that rocket moves with coherence, I used a cubic Beziers curve with control points aligned to the normals of starting and ending surface points.