#Mora - A Narrative Driven Space 4X

1 messages · Page 1 of 1 (latest)

wooden kindle
#
August 3rd, 2132: An Estonian lullaby, slowed to an almost unrecognizable tempo, suddenly overwhelms Earth’s communication networks, originating from nearly every direction at once. At that very moment, the data feed from the Opik International Observatory — a small scientific outpost perched at the edge of the Oort Cloud — abruptly falls silent.

The prologue begins as the rescue ship Lovell is urgently dispatched to investigate.```

Hello (:

I'm working on a retro turn-based space 4X game named (for now![sadok](https://cdn.discordapp.com/emojis/1068114223621754981.webp?size=128 "sadok") ) Mora which is inspired by Three Body Problem, Stars!, Emperor of the Fading Suns and the Space Empires series. My goal is to deliver the same quality sandbox experience those games do, but within a more constrained, narratively-driven context that will allow me to better tailor the player's experience and incorporate elements of cosmic horror while also avoiding the 'paint the map' endgame endemic to the genre.

As the player, you will ultimately be given the role of investigating what precisely caused the events of the Prologue, uniting Earth and her fledgling colonies and surviving for as long as possible in an all but damned galaxy.

You'll be responsible for designing new ships from the ground up using a broad range of different, often customizable, components, training officers to command your ships, armies and govern your worlds, and ultimately struggling against or escaping ||[REDACTED]||.

Just be careful not to get caught snooping around the galactic neighborhood. There's a lot more than icy rocks out there, or, if things go very wrong, perhaps a lot less.

Thanks for taking the time to read! I'm hitting the word count on this post, so next one will have some actual screenshots/vids (yes, the game exists, and is actual mostly playable, I promise!) and go more indepth on mechanics.
wooden kindle
#

Generating a Galaxy: How I Learned to Love Triangles (and You Should Too)

So, in Mora the basic map structure consists of solar systems connected to each other by jump points. It's a pretty simple system, but once you start actually generating these things, you have two issues to deal with:

  1. How do we efficiently place systems on the map, especially when it gets dense? WORD LIMIT :(

  2. How do we determine the best way to connect these systems based on our desired gameplay?

Connecting the Systems

The second question is more interesting. Our goal is to create a map that's both usable (all systems are connected without isolated clusters) and readable, avoiding confusing, overlapping, intersecting connections.

To achieve this, we can use a technique called Delaunay Triangulation. Essentially, we treat our systems as the vertices of triangles, arranging them so that no point is inside the circumcircle of any triangle (see https://ianthehenry.com/posts/delaunay/ who goes into more depth ). The edges become our connections. This creates a graph that is both usable and readable.

However, the resulting graph has too many connections, making it busy and potentially overwhelming from a gameplay perspective, See the first image which retains the full triangulation. To simplify it, we can prune the graph using a Minimum Spanning Tree (MST), which keeps all vertices connected but only retains the shortest possible paths. The result is a graph that’s clean and easy to understand, but it can feel overly linear in gameplay, see the second image.

To strike a balance, we randomly add some of the edges from the original Delaunay Triangulation back into the MST graph. Since we're not removing any edges from the MST, the map remains fully traversable, and because the MST is a subset of the triangulation, we avoid the problem of intersections and spaghetti-like connections. For the map shown in the third image, I used a 1/3 chance to add back extra edges.

#

Images for above, the first is a map with the full delauney triangulation, very busy. The second includes only the subset of connections comprising the MST, and while it's usable every game would bog down fairly quickly. The third includes the full MST + random edges from the triangulation at a 1/3 probability of inclusion.