Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 06:18:55 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Generating systems with star lanes [space]
Pages: [1]
Print
Author Topic: Generating systems with star lanes [space]  (Read 623 times)
Chris Koźmik
Level 5
*****


Silver Lemur Games


View Profile WWW
« on: September 16, 2014, 03:10:13 PM »

I want to generate a star map, stars/systems (no planets, just one circle to represent a whole solar system) and then star lanes between nearby systems (up to 5 connections/paths per system). So, the standard map for many 4X games.

I don't have any formal restrictions, I just want it to look decent. Starlanes are allowed to cross each other, but I prefer if that's not too frequent, also I prefer to avoid long starlanes, but again, that's not a hard restriction.
Performance is almost irrelevant. I prefer it being rather simple in implementation.

My quick idea:
- generate a star in a random position, check if not too near another star, in such case regenerate
- mark one star as starting star then connect a random, not too distant star with it by a starlane
- go to a random connected star and try to connect it with a random nearby unconnected star, repeat until all stars are marked as connected
- connect several random stars with random nearby stars until at average there are around 3 connections per star
(note I have a slight trouble defining what "nearby" means Smiley)
Logged

Stellar Monarch 2 (dev log, IN DEVELOPMENT)
Stellar Monarch (dev log, released)
Chris Koźmik
Level 5
*****


Silver Lemur Games


View Profile WWW
« Reply #1 on: September 18, 2014, 05:44:06 AM »

About star lanes.
What you think of first running a Delaunay triangulation and then removing some connections?
Logged

Stellar Monarch 2 (dev log, IN DEVELOPMENT)
Stellar Monarch (dev log, released)
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic