Live-coding Fleet Commander

I’ve started building a world generator, it’s going to be required sooner or later so I might as well get started with it. I’ve also added luminosity to stars and an (I think) realistic color mapping:

The next thing I am going to add is black holes. Not quite sure what to do about systems with binary or trinary stars. At a guess I should use the brightest star color.

Now that I’m waist deep in it, this world building business is pretty complex.

I think I can see now why the Dwarf Fortress guys go back to the founding of the universe because there is always the problem of what came before.

I can’t just put a crew on a ship now because… well did they just appear there by magic fully formed. So I’m going back 100 years and simulating history, having people be born, get to 16, enter the academy, graduate and filling ships that way so that I can get them into a steady state and have those people age out so that the crew at game-year-0 (for the player) looks realistic and there are a pool of cadets ready as replacements/upgrades.

Even here there are a lot of challenges and I haven’t even introduced planets/colonies, or fixed historical events yet. What on earth have I signed on for!?

To create a spaceship crew, you first have to create the universe lol

It’s rather feeling like that, yes :smiley:

In a way it’s quite fun though. I’m simulating people being born, joining the academy, and developing before seeing whether they are eligible to join a ship.

An unanswered question right now is ‘born where?’ because there are no planets or colonies.

In essence this is a question that might not matter except that I want the player to come to care about these people so the more like individuals they are the better.

So now I am going to have to start adding creating of colonies to the world builder and then decide how many applicants each colony provides based on its growth. Also if maybe colony specifics might affect individuals somehow. I haven’t thought that far ahead.

I’m also trying to figure out where the ships are coming from which means, for example, how long does a ship stay in service. So I guess I am going to have to have ships be commissioned and decommissioned.

Design Note

Here is the current model for my fleet officers:

STATS

mind - Thinking power, perception, smarts
body - Toughness, agility
luck - Get out of jail freeness

PSYCHOLOGY

boldness
Lo = better on defence, steady, focus on crew safety
Hi = excels in combat, seizes opportunities, takes risks

empathy
Lo = efficient resource use, unpopular but effective
Hi = strong crew loyalty, diplomatic success, hesitant at risk

discipline
Lo = creative solutions, flexible to situation, unreliable procedures
Hi = excellent training, predictable performance, slow to adapt

ambition
Lo = content with current role, stable performance, missed opportunities
Hi = drives for promotion, pushes boundaries, make take unnecssary risks

presence
Lo = strong delegation, chain of command, more strategic, empowers subordinates
Hi = in the thick of it, hands-on, leads from the front, personal direction

trust
Lo = Suspicious, guarded, hard to surprise, calculating, strategic, struggles to build loyalty or rapport
Hi = Trusting, open, fosters strong team bonds, develops officers, vulnerable to betrayal or traps

curiosity
Lo = focused on objectives, resistant to distractions, may miss useful discoveries
Hi = strong research aptitude, investigative mindset, can be drawn off-mission

pragmatism
Lo = idealistic, principled decisions, may sacrifice tactical advantage for beliefs
Hi = practical solutions, flexible ethics, achieves objectives at moral cost

I’m currently debating adding:

stability
Lo = erratic under pressure, emotional decisions, may panic or freeze
Hi = clear thinking in crisis, maintains command presence, may seem detached

I think there is a key role for performance under pressure but (a) it has overlaps with boldness and discipline, (b) all of my other traits have advantages & disadvantages to both ends of the spectrum but this one is Lo=Bad Hi=Good.

An alternative design is to make stress a specific mechanic. So each officer would have stress, stress_threshold and stress_recovery. Once their stress goes over the threshold it starts having other effects. The threshold and recovery rates could be related to other traits.

SKILLS

There are also a set of skills related to starship operation (later I plan to add skills related to away missions of various kinds).

  • command
  • operations
  • tactical
  • navigation
  • helm
  • engineering
  • science
  • medical

I’m not sold on the mind/body stats. Given the psychological model do we need a “mind” stat. At this point it mainly represents speed-of-thought rather than quality-of-thought.

I kept it simple as mind/body/luck because given skills, psychological variables, etc… do we need lots more stats? Then again, when this character is in a situation might it be relevant whether they are strong but also clumsy or dextrous?

There are two other aspects that I am thinking about:

  • humour
  • romance

Some of the psychological stats will determine likability. For example an officer with low-empathy, low-trust, high ambition and high boldness is very likely to be unlikeable. But is there a way to develop humour as part of the game?

A military ship is probably a bad place for romance but I guess it’s going to happen anyway and could be an interesting mechanic. Do you send someone you’re secretly bopping on a dangerous away mission?

Design Note:

How do we allow the player to make the universe “their own”?

  • being able to favourite officers that you want to follow & develop/promote
  • add your own notes to things
  • make ships into characters
  • use story points to alter the course of the lore/narrative
  • assign crews to ships and ships to situations to see how they develop
  • draw connections between situations/events and the lore

I’ve been on quite a long journey for something that appears little different to the screenshot I posted a month ago.

I’ve more-or-less implemented the method of star system generation from my friend Chris Bateman’s 1995 sci-fi RPG ‘Outlands’. That system is relatively-accurate, as per 1995 astronomical science, with some concessions made for gameplay purposes. Good enough for FC.

Now I have stars and planets I have to make some of them habitable, some colonized, and spread some pre-cursor ruins about the place for the player to uncover and research.

Reading your notes about this is making me want to create a dwarf-fortress like game in space. And yes, with all of dwarf fortress’s complexity. Generating a universe, selecting planets for life to evolve, simulating their expansion, wars, diplomacy and somewhere down the line you drop a player in the world.

I say “go for it”. I’m finding the world building challenging but satisfying. The idea sounds exciting.

Also maybe you will be able to solve a thorny chicken & egg problem that I am still wrestling with:

  • We have a ship
  • It needs a crew
  • So we need crew members
  • So we generate them
  • But where did they come from?
  • Other ships?
  • Where did those come from?
  • And was this first ship new?
  • Didn’t it have a previous crew?
  • Where did they come from?
  • …and so it goes

To create anything I need the thing that came before. At the moment the compromise I am working with is to have some cut-off point. So if you explore a ships history you’ll reach a point where you can’t go back any further. E.g. there will be a captain who just kind of “appeared” out of nowhere.

My other alternative is to really go the whole hog and simulate back to the beginnings of humans in space. But that feels like overkill for me right now. In fact if you do follow your idea you will be doing the “an amoeba meets another amoeba” dance so you won’t hit this problem.

Yeah, my solution in this case would be to just go ALL the way down. For you, you could probably say the cutoff for the ship is when it was build, and the crew goes back to graduation on an academy on some planet. But unless you want to make players enable to encounter other ships with specific interactions based on if your crew was on that ship in the past, you can just make up ship names and such in the code.

I wanted to make something of an open-world “space trader” game for a while (also with a bit more content). Cosmoteer is going in the right direction, but it’s limited by having to simulate everything in 2D. I’d go more of an Aurora 4X route and make sort of an excel game. Great game btw, but unplayable if you don’t happen to have a sci-fi photonic CPU, since it’s in BASIC and single-threaded.

Can I also just give you a thanks for saying this. I often feel I am posting something uninteresting and maybe even “not IF” in the eyes of some (at least that’s my own form of paranoia). So it’s nice to hear that someone else is getting something from it. Especially some inspiration to do their own thing.

Well, I have about a dozen game ideas in my list, with only a few of them fitting for IF (at least if you don’t count “text-based procedural RPG” as IF), and some of these principles are applicable to general programming and other types of games as well. For instance I’ll probably also look at the star generation paper you linked.

One time I even wanted to go all the way down to simulating an early universe and the approximate evolution, but I soon learned why we have supercomputers to do that lol.

There ale awesome talks about procedural generation from other game developers out there, I think the history generation of Caves of Qud could be interesting to you, as you want to have something similar. I think the developer did a talk on that. Roguelike conferences have good talks about procedural generation of all kinds in general.

I get that, too. Honestly I’m baffled anytime a github repo of mine gets a star lol. My best one currently is the Termux:GUI plugin for the Termux terminal emulator and linux-like environment on Android. That started out as a proof of concept that I did because I wanted these features, but nowadays I find implementing it much more entertaining than actually using it.