Implementing New Game Settings

The purpose of this thread is to design the new game settings screen (excluding planet generation), ideally ready for implementation in 0.5.9.

I’m jumping the gun a bit here as I won’t be able to work on this for like a month (exams + learning the codebase + smaller additions first) but considering some recent discussions and features currently being worked on, I think it makes sense to get this discussion started. I’ve been thinking about it quite a bit lately at any rate, and I have ideas I need to get down.

Relevant Discussions

Proposed Design

Here’s my proposal. Feel free to provide opinions and input. There’s quite a lot to gather agreement on which is why I’m doing this a bit early.

Clicking ‘New Game’ now opens a new interface in the style of the options menu. This includes back and confirm buttons below the main panel. There are three tabs, described below, and each time the player enters this scene, all options are reset to their default values.

The first tab, labelled ‘Difficulty’, is self-explanatory, and contains the following options. Unless the difficulty preset is set to ‘Custom’, all but the first option are not editable, and have visuals to indicate this, e.g. they’re greyed out when inactive.

  • Difficulty preset - Drop-down with ‘Easy’, ‘Normal’, ‘Hard’ and ‘Custom’. The first three set the rest of the settings in this tab to pre-defined values, while ‘Custom’ doesn’t change any values but does allow for player editing (until this setting is changed). Default value is ‘Normal’.

  • Compound cloud density - Numeric value. A multiplier for the base density of compound cloud spawns, so lower values are harder and higher values are easier.

  • Mutation cost multiplier - Numeric value. A multiplier for the MP cost of every action in the editor, so lower values are easier and higher values are harder. Obviously the actual editor values will be rounded to integers and clamped between 0 and 100. An alternative for this option would be to change the actual amount of MP available, but considering 100 MP is supposed to represent 100% change, this is an equivalent approach which retains that perspective.

  • Player death population penalty - Numeric value. How much population the player species loses when they die, so lower values are easier and higher values are harder. I don’t know enough to even guess what values this would take at the moment.

  • Glucose decay rate - Numeric value. A multiplier for the passive decay of glucose in patches, so lower values are easier and higher values are harder.

  • Free glucose cloud when leaving editor - Checkbox. Adds a small glucose cloud next to the player when they exit the editor. My thinking behind this is that, with the spawn system the way it is, it can be pretty brutal to enter a new patch if you aren’t prepared for it. With new patches often so barren to start off with, you’ll likely run out of glucose and die before you find anything. So having this checkbox on for the ‘Easy’ setting will provide a slight buffer for new players.

  • Auto-Evo AI fitness - I don’t have much clue yet what exactly this would be, or even if it’s possible with the current system. But it would be nice to have one or several options related to Auto-Evo to vary the fitness of the organisms it creates.

A note on numeric values: I’m not sure whether it’s better to represent these with a textbox, a slider, or something else. For almost all of the above, it would be sensible to have maximum and minimum values so the player doesn’t catastrophically break the game in ‘Custom’ mode. How we want to represent those, and how they relate to the preset values, will determine the solution.

The second tab is ‘Planet’, with the following features.

  • Patch map type - Drop-down with ‘Procedural’ and ‘Classic’. Switches between the existing patch map and a procedurally generated one. I’m not sure how everyone else feels about this, but I think it would be nice to give the player the option to play a game with the known, static patch map layout, at least for now. I’ve looked through Kemikal’s code for the procedural patch map and the old one’s still in there, so it’s pretty simple to switch between them when setting up a new game (I tested this and it worked perfectly with like two lines changed). Default value is ‘Procedural’.

  • Life origins - Drop-down with ‘Hydrothermal vents’, ‘Warm pond’, ‘Panspermia’, maybe some others. Determines the player’s starting patch, with ‘Panspermia’ dropping them somewhere random, as if arriving on a meteorite. Could have some interactions with the LAWK toggle in future, but just the few options we know are theoretically possible will be enough for now. Default value is ‘Hydrothermal vents’.

  • Planet generation placeholder graphics - Artwork representing the more detailed planet generator to come. Maybe add a Magrathea reference and/or a banner proclaiming ‘COMING SOON!’. I’m sure our artists could have some fun with this.

The final tab is ‘Misc’, with the following options.

  • LAWK only - Checkbox. When enabled, non-LAWK (Life as We Know It) organelles, processes, etc. are not present in game for either the player or AI cells. This should finally let us add thermoplasts (conditionally). Default value is off.

  • Include Multicellular Stage prototype - Checkbox. When enabled, the player can enter the Multicellular Stage as normal. When disabled, the ‘Become Multicellular’ button is blocked from appearing, so the player remains in the Microbe Stage. Maybe emphasise that this is here because the Multicellular Stage is buggier and experimental? Default value is on.

  • Enable cannibalism (TBA?) - Checkbox. Allows cells (including the player) to eat and be eaten by members of their own species. A basic implementation is as simple as removing a few checks in the code (again, I tried it and it really is that easy), but there are a few secondary factors to consider. How does cannibalism affect Auto-Evo? Do signalling agents override predatory behaviour towards the same species? I think it would be nice to have this as a toggleable option, at least in the near future, but it might well be too complex to think about for 0.5.9. Default value is off.

  • Day/night cycle (TBA) - Checkbox. Greyed out. For now, nothing but a tease for this feature coming in the near future. In my view, the day/night cycle could be such a substantial change to gameplay that players will get an entirely different experience with and without it, so it makes sense to have it toggleable.

The full state of these options is saved to the world generation settings after clicking ‘Confirm’. The save file then retains the information.

Interactions with Other Features

An advantage of getting this done for 0.5.9 is the save incompatibility point. I suppose it’s possible to have a null check when loading a game and generate default game settings to match pre-0.5.9 games though.

The spawn system overhaul will interact with the difficulty settings, especially cloud density. So this feature should be added only after the spawn system work is done.

The procedural patch map also has interaction concerns. I wanted to make this post now because I noticed the old patch map is still hidden in Kemikal’s code. If people think the patch map toggle option is a good idea, then please keep it that way. As above, the patch map should ideally be completed before this feature.

Future Design

Obviously adding planet generation is the big one, but hopefully this design is modular enough to allow for that whoever takes it up. Extra options are similar, with null checks and default values to not break save compatibility again.

Next Steps

As I said, I won’t be able to work on this for about a month. I definitely want to though. Difficulty options in particular will be important additions for testing and player feedback.

In the meantime, please let me know what you think. Are some things too ambitious for 0.5.9? Are there other things I’ve missed? I’m hoping that we’ve finalised the design by the time I’m ready to work on it.

4 Likes

I think the potential options are fine, but I think the representation needs to be considered.

My idea is that basically there’s just a scrollable view with the most important settings like difficulty, planet type, random game seed, LAWK, and which type of start to have. Basically options that players can look through and change, even on their first playthrough. Then all of the other options would be behind some button to open advanced setting. That could be be a popup window or just another view or maybe even just the extra settings could be shown in the main scrollable area.

Also I was initially thinking about finishing thermoplasts soon (which would require a new game options screen for LAWK toggle), but now with the dynamic MP taking so long, I’m burned out on trying to finish other people’s PRs. Instead I’ll probably just ask the VIP patrons if I should bother with a simple new game screen. It would only have a few options that can’t be changed like difficulty and planet type, and some things that could be done already like the LAWK toggle (though there wouldn’t be anything for it to control), and the new game map seed. I would make it with that one scrollable view approach so that it wouldn’t look like an intimidating screen with a bunch of tabs, after all first time playing experience is very important to get right. I might work on this in the next 2-3 weeks, unless the VIP patrons vote that I should jump to the later stage prototypes.

3 Likes

Hmm, good point. I still like the three tabs idea as it nicely separates the major variables, so maybe that could be the advanced view as you say.

Yeah, I think the advanced view would be fine to split things into tabs to fit even more options in there.

This all looks good, and good idea to centralize this discussion into a post.

One small comment though is that I feel since cannibalism should more be an adaptation rather than a setting per se, as it’s a unique behavior with evolutionary benefits and detriments. Although it can definitely a permanent mode/setting as well; perhaps the community would find it interesting.

1 Like

This is good, I support this overall layout for the most part.

The proposed difficulty settings are a great start, while some feel like they might take some additional effort to implement, others are pretty much already a thing since they are just constants in constant.cs, they’re just not customizable variables right now. It also doesn’t seem like it will take too much effort to balance since we’ll just need to focus primarily on the “normal” setting. (Though we might need to play around to decide on the exact presets for best results).

It’s also worth mentioning that there exists a autoevo impact constant, which determines how much the player’s population is effected by autoevo’s whims.

An interesting choice, It reminds of generation “seeds” used in lots of sandbox game worlds. Perhaps we could have something similar someday, which this idea could serve as a placeholder of.

I actually feel like this might someday be more of a behavioral adaptation than a setting in the game. Basically giving the players a choice of putting up with allies eating up resources around them, or worrying about the intent of the allies themselves.

I think I agree about cannibalism. My reason for including it here was a reaction to complaints from players in the current version (see here) but it’s probably not much more work to have it as a per-species mutation, which offers much more dynamic gameplay options.

I’ve started work on this because I’ve been itching to get to it. You can view my progress in the new_game_settings branch.

So far I have the basic view fully set up, with randomisation and input validation for the random seed. New game in the main menu now sends you here, while the confirm button takes its place in starting the game.

You can also switch to the advanced view and back with the appropriate buttons, although so far I haven’t added anything here.

Creating a WorldGenerationSettings object with all the right info on pressing confirm was straightforward, but I’m having trouble passing that object to the stage itself. Suggestions from those who know the code structure are welcome.

Design feedback is also welcome, particularly when it comes to the order of options in the basic view.

Note that I won’t be able to fully implement this until the spawn system rework and procedural patch map are done. But I’ll do as much as I can to make it easier once we get there.

4 Likes

Changing:

SceneManager.Instance.SwitchToScene(MainGameState.MicrobeStage);

to:

var microbeStage = (MicrobeStage)SceneManager.Instance.LoadScene(MainGameState.MicrobeStage).Instance();
microbeStage.CurrentGame = /* reference the setup game here */;
SceneManager.Instance.SwitchToScene(microbeStage);

should do the trick. Though, as this has never been done before there may be a hidden bug in the microbe stage starting it that way.

Edit: also just remembered when reviewing another PR that the free build entering code already does that as that’s how it communicates to the stage that it should be in freebuild mode (though in that case it goes to the microbe editor so the code isn’t exactly the same).

I think I saw that and tried something similar. The issue was adding the WorldGenerationSettings object to CurrentGame in the right way.

GameProperties is not currently setup to accept predefined game settings. I’d change that to something like:

    private GameProperties(WorldGenerationSettings? settings = null)
    {
        settings ??= new WorldGenerationSettings();
        GameWorld = new GameWorld(settings);
        TutorialState = new TutorialState();
    }

Probably have been mentioned before but I think it would be fun if we add placeholder sliders or labels in there, for example sliders like planet mass, planet radius, orbital radius, and habitability percentage indicator etc in the planet tab. These elements would of course be greyed out and only serve as a teaser for the actual planet customization feature.

By the way, where would the options for star generation be placed. I recall that’s also planned way back, would it have its own tab or would it just be bundled in the planet tab?

I think only the planet type should be a simple start option to select from some presets, and that would cause a planet of that type along with a compatible sun to be generated.

3 Likes

Personal thoughts of difficulty levers:

If I were you I’d stay out of the food source classes. Not only are they brittle and hard to test…

Wait, what’s that?

It’s a bird!

It’s a plane!

It’s Hhyyrylainen wishing that someone would implement an auto-evo-exploring tool!

…sorry, got distracted. Anyway, not only that, but those heuristics for fitness are both used to judge the player and the NPC species, so anything that makes it easier or harder for the AI to be big and fierce will do the same thing for the player. You could try to make it more exacting, but that wouldn’t be much of gameplay, it would just pigeonhole the player into a more specific bodyplan.

The mutation code, however, might be more promising. We have some constants that govern how big AI species get, and how fast. This is still naturally selected by the food sources, but I imagine pumping those numbers up or down would make the player feel “out-evolved” to a different degree.

I’d lean more towards changing use of compounds over spawning of compounds. Particularly on hard mode, the game just not giving you phosphate isn’t challenging, it’s punishing. In the difficulty PR I abandonded I focused on the rate of ATP consumption. That forces more pressure on the player, but still gives the same opportunities.

I’d add player HP to your list. Messing with other microbes’ HP runs a risk of serious bullet sponging on hard (some species are already really tough to kill without cheesing a pilus), but Thrive would be very different if a spinning pilus wasn’t a one-hit kill, or if a single toxin shot was.

I’d also take a look at messing with the velocity of toxin particles. Watching other people play, I’ve noticed that the scariest part of most people’s games are when a big linage of toxin-shooters emerge, and the game turns into a bullet hell. Giving players more or less time to react to just that one scenario might do a lot for player perception.

2 Likes

:+1:

I think I get your overall point, but I’d like to highlight that this is kind of a bug:

1 Like

One little thing to bring up regarding difficulty which can be easy to implement and I haven’t really seen: perhaps auto-evo effects and the effects of dying on population could be messed with, with easier difficulties allowing a lot more deaths before extinction and having off-screen auto-evo effects not be as negative. Though that would have to be carefully dealt with - size for example is a very finicky and influential yet heavily tied to realism balancing mechanism.

I’ve spent the last few days putting this feature together, and I now believe I have something ready for people to test and review. See the pull request here:

Aside from general feedback, there are three more things I need:

  • Input on the minimum and maximum values for each difficulty parameter, and input on the values assigned for the easy and hard presets (normal has everything set to the existing values). This might take quite a bit of testing and is also dependent on the spawn system rework, since the cloud density parameter especially will work very differently with that in play.

  • Input on what the random seed should affect. Currently it only changes the randomly generated planet name, but once the procedural patch map is done, it should be trivial to plug it in there too. I’m just wondering if there’s anything else @hhyyrylainen in particular intended to use it for.

  • A placeholder graphic for planet generation. I found an old piece of concept art by @DonGororo and used that for now, but if our graphic artists want something to do, it might be a good idea to make a better teaser.

4 Likes

I can’t really think of anything except the planet for now. In the future I think it should be the seed for all random place generation.


I think the classic patch map layout should be hidden from the general view. I can’t imagine that it will be popular enough to highlight, or is that already the advanced view?

Yeah, that’s the planet tab in the advanced view. Basic view has only difficulty preset, life origin, LAWK and seed.

1 Like

I think a menu that goes one deeper than the advanced menu under the policy of you break things and it’s your fault would be interesting. Lets some more adventurous players customize their game even more, and who knows, someone might find some settings that are more fun than the current ones.