To test out some fractal algorithms, I have hacked together a simple "star map generator":
The galaxy map is similar to the structure used in EvE, where each starsystem is accessible by at least one connection / wormhole, while keeping the number of connections between stars low to allow chocke-points.
The Universe is generating clusters of stars in various sizes, eg "hubs" of civilizations.
Larger Star-systems are named by a random algorithm. (that can be certainly improved)
browser version: ( starmap generator )
-> click to toggle names, drag to tilt the map
The generation might take a while, as it looks for a specific "nice" setup, and might repeat itself if it cannot find it.
Hit "F5" to reload the page and thus regenerate the map. I have to implement some GUI here..
Post
Sun May 28, 2017 3:37 pm
#2
Re: Procedural Galaxy Generator
heh, looks cool
now expand it that it works without a set size but can expand in any direction when needed
now expand it that it works without a set size but can expand in any direction when needed
Post
Sun May 28, 2017 3:44 pm
#3
Re: Procedural Galaxy Generator
Technically it could generate itself infinitely.
Since I check that all paths are connected to the "main grid" (time grows exponentially), this would require the "universe" to consist out of a lot of clusters, that get a few connection points to the neighboring cluster at the outer edges.
This would also make it interesting to the player. As those connections to "new clusters" could be hidden in the gameworld, and require scanning it in one of the star-systems at the "outer rim".
I have kept the number of stars below 1000 here, as this demo is using a very ineffective rendering, and I tried to keep it smooth when scrolling the map.
Since I check that all paths are connected to the "main grid" (time grows exponentially), this would require the "universe" to consist out of a lot of clusters, that get a few connection points to the neighboring cluster at the outer edges.
This would also make it interesting to the player. As those connections to "new clusters" could be hidden in the gameworld, and require scanning it in one of the star-systems at the "outer rim".
I have kept the number of stars below 1000 here, as this demo is using a very ineffective rendering, and I tried to keep it smooth when scrolling the map.
Post
Sun May 28, 2017 4:00 pm
#4
Re: Procedural Galaxy Generator
Nice work, now you need to cull connections that are close to the same direction and very close or touching.
This way you can more easily see individual connections.
I might have to steal your code if I can find some time at work to abuse it today.
This way you can more easily see individual connections.
I might have to steal your code if I can find some time at work to abuse it today.
<Cuisinart8> apparently without the demon driving him around Silver has the intelligence of a botched lobotomy patient ~ Mar 04 2020
console.log(`What's all ${this} ${Date.now()}`);
console.log(`What's all ${this} ${Date.now()}`);
Post
Sun May 28, 2017 4:06 pm
#5
Re: Procedural Galaxy Generator
You can tilt the map by dragging up and down to see the structure better.
I might have to implement a rotation transformation to make it more fun to zoom though the map.
But that probably requires the number of stars to go down a bit, as this is just very basic canvas rendering.
I might have to implement a rotation transformation to make it more fun to zoom though the map.
But that probably requires the number of stars to go down a bit, as this is just very basic canvas rendering.
Post
Sun May 28, 2017 4:06 pm
#6
Just remember, that most people view a starmap from the same direction and rotation.
Culling those connections is the best idea.
Re: Procedural Galaxy Generator
Yeah, Stellaris has this problem occasionally also.Damocles wrote:You can tilt the map by dragging up and down to see the structure better.
I might have to implement a rotation transformation to make it more fun to zoom though the map.
But that probably requires the number of stars to go down a bit, as this is just very basic canvas rendering.
Just remember, that most people view a starmap from the same direction and rotation.
Culling those connections is the best idea.
<Cuisinart8> apparently without the demon driving him around Silver has the intelligence of a botched lobotomy patient ~ Mar 04 2020
console.log(`What's all ${this} ${Date.now()}`);
console.log(`What's all ${this} ${Date.now()}`);
Post
Mon May 29, 2017 12:03 am
#7
Re: Procedural Galaxy Generator
This is REALLY neat! Love it! Great work there!
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post
Mon May 29, 2017 12:16 pm
#9
Re: Procedural Galaxy Generator
This is pretty much what I'd hope to see in LT. I'd imagine that each star represents a system in the LT universe with each known system showing up and displaying the discovered wormhole connections.
Post
Mon May 29, 2017 12:43 pm
#10
Re: Procedural Galaxy Generator
The Systems could be structured like this:
Where each "Location" is a "Level / Instance".
It uses the same nebula/background and different scales of the Sun (depending on distance),
and its corresponding planet, moon, asteroid-field, wreckage-field or other feature in its corresponding location.
Travelling -within- a system, gives the player a vaster representation of space, than just having one (in realistic terms tiny) location per system.
EvE basically used this instancing system to represent Space, travelling between locations using the warp-drive.
(they are not actually physically connected, but spawn a new location as needed)
Advantage: some locations within the system need to be first discovered (scanning), or can require a special gate to reach them.
It gives a pretty nice feeling of space without the technical difficulties (and huge empty areas) or free space travel within the system.
It uses the same nebula/background and different scales of the Sun (depending on distance),
and its corresponding planet, moon, asteroid-field, wreckage-field or other feature in its corresponding location.
Travelling -within- a system, gives the player a vaster representation of space, than just having one (in realistic terms tiny) location per system.
EvE basically used this instancing system to represent Space, travelling between locations using the warp-drive.
(they are not actually physically connected, but spawn a new location as needed)
Advantage: some locations within the system need to be first discovered (scanning), or can require a special gate to reach them.
It gives a pretty nice feeling of space without the technical difficulties (and huge empty areas) or free space travel within the system.
Last edited by Damocles on Sat Jun 03, 2017 4:06 pm, edited 2 times in total.
Post
Mon May 29, 2017 3:11 pm
#11
Re: Procedural Galaxy Generator
I have already written Stellar generation, and kepler motion into JS in the past for the Borealis project. (an attempt at a JS version of Aurora 4X)
I can provide the source for both if you wish.
Hell, we could open that project back up in Cloud9. :V
I can provide the source for both if you wish.
Hell, we could open that project back up in Cloud9. :V
<Cuisinart8> apparently without the demon driving him around Silver has the intelligence of a botched lobotomy patient ~ Mar 04 2020
console.log(`What's all ${this} ${Date.now()}`);
console.log(`What's all ${this} ${Date.now()}`);
Post
Mon May 29, 2017 3:56 pm
#12
Re: Procedural Galaxy Generator
Sounds interesting.
Let me get back to that later when I have more time.
Let me get back to that later when I have more time.
Post
Mon May 29, 2017 7:01 pm
#13
Re: Procedural Galaxy Generator
http://www.goat.army/prototypes/ring_galaxy.htm
[Press space to reload the galaxy]
So I got started on my own version. And have a basic ring galaxy generating with complex star color/temp/mass. :V
The stars are based on real star color distributions, and I have a bunch more work to do on those. (like variable, and twin stars)
But the idea I want to test, is if I can get these moving and keeping the structure, while providing dynamic wormholes.
Basically I am going to make each star move through the galaxy in a Kepler orbit (incorrect as all hell) and then have it create and destroy wormhole links based on distance to neighbours.
In theory this would provide a HIGHLY dynamic galactic battlefield. Which would make large empires hard to maintain, and lead to more fracturing of nations. Which would be cool for a space Grand Strategy. :V
But mostly I just wanna see what it would look like. :3
EDIT::
http://www.goat.army/prototypes/star_links.htm
Sorted out distance based Links between stars.
[1] [2] and [3] toggle rendering of things.
Working on the orbits next.
[Press space to reload the galaxy]
Spoiler: SHOW
The stars are based on real star color distributions, and I have a bunch more work to do on those. (like variable, and twin stars)
But the idea I want to test, is if I can get these moving and keeping the structure, while providing dynamic wormholes.
Basically I am going to make each star move through the galaxy in a Kepler orbit (incorrect as all hell) and then have it create and destroy wormhole links based on distance to neighbours.
In theory this would provide a HIGHLY dynamic galactic battlefield. Which would make large empires hard to maintain, and lead to more fracturing of nations. Which would be cool for a space Grand Strategy. :V
But mostly I just wanna see what it would look like. :3
EDIT::
http://www.goat.army/prototypes/star_links.htm
Sorted out distance based Links between stars.
[1] [2] and [3] toggle rendering of things.
Working on the orbits next.
<Cuisinart8> apparently without the demon driving him around Silver has the intelligence of a botched lobotomy patient ~ Mar 04 2020
console.log(`What's all ${this} ${Date.now()}`);
console.log(`What's all ${this} ${Date.now()}`);
Post
Tue May 30, 2017 12:09 am
#14
Re: Procedural Galaxy Generator
How do you all just put out these things? I wouldn't even know how and where to start! This thread makes me really sad...kinda...
Automation engineer, lateral thinker, soldier, addicted to music, books and gaming.
Nothing to see here
Nothing to see here
Flatfingers wrote: 23.01.2017: "Show me the smoldering corpse of Perfectionist Josh"
Post
Tue May 30, 2017 12:50 am
#15
Re: Procedural Galaxy Generator
I'm guessing a good but of coding knowledge and experience helps.JanB1 wrote:How do you all just put out these things? I wouldn't even know how and where to start! This thread makes me really sad...kinda...