My last project in Construct3 - so I decided to do something I always wanted to try out. Works out pretty cool I have to say. The code actually uses a grid, but the position of the nodes is randomly shifted a bit out away from the grid positions.

If you are wondering about how the algorithm works, the code is commented out.

The sliders do the following:

  1.  Width and Height set [drum rolls] the width and height of the grid. Increasing the numbers will create a more spaced level, whle decreasing it will make the level tighter.
  2. Number of Nodes is the amount of nodes/planets/stars the algorithm will create.
  3. Max Connection Distance is the maximum distance the nodes can have between each other, and be connected. Increasing this will make level more interconnected.

Distribution license

All materials here are free to use for both personal and commersial projects. Selling it (adjusted or not) is not permitted.

PS

If you need help with the code, have found a bug, have some ideas on how to make it better please reach out to me on twitter @AtwoodPer

Tagging me on Twitter or just linking to this itch.io page would be very nice, but not mandatory. Consider donating if this helped you out and you would want me to make more of similar things.

StatusReleased
PlatformsHTML5
Rating
Rated 2.0 out of 5 stars
(1 total ratings)
Authorpoppants
Made withConstruct
TagsProcedural Generation, Roguelike, sourcecode

Download

Download NowName your own price

Click download now to get access to the following files:

Starmap Generation.c3p 58 kB

Leave a comment

Log in with itch.io to leave a comment.