The Microbe Spawn System

As many have likely noticed; Ever since we made the transition from Leviathan to Godot, our spawn system has become ineffective and rather undependable. It is possible that we will need to rework the system from the ground up in an effort to create a much more even and dependable gameplay experience.

We had some brief discussion within our developer chatroom over the matter, and numerous people have come up with their own ideas on how the issue could be potentially solved.
I have posted these here so that they would not be lost in the chatroom.

Naggorath:
“i had a quite simple suggestion/additon: increasing the chance of species being able to use a certain compound to spawn near said compound. this would mean that bacteria or cells with rusticyanin could spawn closer to iron chunks and such. my idea is that it would make it harder to get those compounds if you are also depending on them, meaning that you actually have to compete with the others to get it. its just a little thing, but just something i was thinking about when i was getting trailer footage”

Buckly:
“That would definitely make things more interesting, and believable too. I would want to try to limit that to atleast one cell per specified concentration of compound, so that it wouldn’t be too overwhelming
If possible that would also be something I would love to see coupled with a spawn system that encourages more species diversity in spawns. That is, instead of spawning massive clusters of a single species, they could generate singles of one species based on the current situation
Something like
1 respiring cell per 1000 glucose around the player
1 predator cell per 5 cells around the player
I do not know how feasible such a style would be from the programming perspective, but now I am quite curious about such a potentially responsive system
I also fear that it could potentially be resource intensive when it comes to processing all that detection”

TJWhale:
“I think firstly it’s worth saying the work you’ve done on it already is cool Ice. I think a lot of game design is about trying something, getting a feel for it and then iterating or even trying something else.
I’ve been watching Liam make a game called Patch Quest and he has redone core features several times and it really shows now, the game is really solid.
So yeah I think I wanted to say that even if spawning is started again what was made before is worthwhile and an important part of the process.
One thought about an algorithm is maybe something based on like nucleation, to draw things together into blobs.
So imagine just scattering a load of points over the plane (could be a grid but that’s a bit dry) and each time you approach a point the game picks 0-10 microbes (of random species) and 0-3 clouds and spawns them, relatively densely, together around that point.
That would sort of lead to these little islands of interaction. Where each time you meet one you need to think about risk vs reward of the other microbes and the resources that are there.
I think some sort of clustering like this might help create some action in those places.”

There were some nice ideas raised when we discussed this last, but we never came to any conclusion on how exactly we really want to handle the spawn system.
The ideas previously raised can fortunately mesh well together as one cohesive plan, but we still need to decide on what is feasible.

In particular, I really like Tjwhale’s idea. It is more cohesive, and will make for a great foundation that we can build off of in this thread.

Having a sort of “encounter” at specific destinations would make exploration feel more alive, and potentially make steady movement more rewarding and interesting. If we decide to go with this, we will need to come up with a method of spawning things steadily as well however; So that the world does not become lifeless when the player stands still. Cells should still be able to come and go even when the player isn’t actively exploring.
My only idea for this is that cells could spawn around the player on a timer or other condition, whenever there are currently no other cells present for a certain timespan.

Alternatively, we could try to reapproach the current spawn system which spawns objects in a ring around the player just outside of their vision. Ideally, this should make it so that the player must move in order to find more resources, but ultimately it seems that moving in a roughly circular path results in a performance dropping mass of resources everywhere.

I feel that my and Naggorath’s ideas could potentially bring order to this otherwise chaotic system by imposing limiting conditions on the spawning of objects. We would still need to consider how to handle compound and chunk spawns to avoid them spawning in too much excess of course.
It is also important to consider that we will need to carefully analyze the system in order to find out what is causing issues, such as iron never spawning in places it should be plentiful, and so on; Else we will need to recreate it entirely but keep the general idea behind it’s functions.

I am personally leaning towards Tjwhale’s proposal as I feel that it could make for a more stable experience. I would like to hear what everyone else thinks before moving on as we need to decide on the foundation of how we want the spawn system to operate.

4 Likes

I think the clustering approach is a good direction to take things.

In addition / before that, I’d like to tweak the spawn system to be more consistent. What I mean by that is that we should implement timers and some kind of priority list (based on if spawning some specific thing fails too much it is given priority). What I hope to achieve with that is to have the rate of the player encountering spawned stuff be much more predictable than it currently is. And the other change is about making sure that the player encounters at least some members of species A, some chunks, etc. So it would work by having a weighted chance for things to spawn when it is time to spawn something, and if something is not spawning in a ratio that it should (according to a species population, chunk density etc.) it is given a boosted chance.

Of course I don’t know before coding that and testing it, but I think that could already solve a lot of the problems players experience caused by the spawn system, and it should be pretty easy to do as it would be a bit of a tweak of the current spawn system, instead of reworking the logic entirely (if we want to spawn these “encounters”, which I think would be a good future direction, we need to design and code how the game build “interesting” encounters and takes into account the different chunk and species densities in a patch).

3 Likes

Opened an issue on Github to track this:

Alright, after a little bit of thinking I believe I may have some ideas for how our spawn system could be redesigned.

Basic Triggers
First and foremost is what we already seem to have decided on. The spawns will now be instigated by the player reaching a “node”, which will trigger an “encounter”. The trigger radius should probably be far greater than the actual spawn radius of each node so that the player will not view things poofing into existence.
Edit: Or maybe we could potentially implement a “spawning animation” where AI cells rise or sink to the playing field from elsewhere.
Once the player reaches a trigger, it will spawn an assortment of compounds and organisms based on the conditions I will define later.

An important thing to consider here is how exactly these nodes will be organized within the game map. I am personally unfamiliar with the intricacies of this system so I rather uncertain what the best option would be.

In the event the player remains still, we may need to introduce some variation of our current timer-based spawn system but limited to organisms only, so that the player may encounter roaming species even if they are not moving. This would function alongside the nodes system.

Spawn Conditions:
I have a few ideas for how we could manage the conditions of spawns. None of them are what I would call perfect and are rather loose in concept at the moment.

  1. Points
    In order to keep spawns limited to a desirable amount, I have considered the potential of a variable “currency” or point limit that would prevent the game from overwhelming the player with insurmountable odds or just too many objects of one kind.
    To put it simply, the game would have what is comparable to an MP bar for each encounter. The system will select available objects to spawn, each object possessing an individual cost, until it runs out of “currency” and the encounter is created. So for example (Assuming compounds are not included in this limit); The spawn system would have 1000 points and and a couple species to select from, species A being 250 points and species B being 500 points. This would result in the spawn system spawning either 4 Bs, 2 As, or 2 As and 1 B.
    The point cost of spawning a species would be determined by things like the parts they have, behavior, population count, size, speed, etc. for If we choose to go with this idea we will have to choose what contributes to the point cost, and how. Additionally we will have to consider how exactly the spawn system would make decisions on what to spend it’s points on. Would it be random? Another thing to consider is if we would want compounds to be included in this limit or if they should be handled separately.

  2. Limiting Population
    This limit would use population size and compound concentration to determine how many objects are spawned. This concept would determine the max number of an object being spawned by dividing population count/concentration by a number of our choosing, up to a specified limit to prevent things getting too extreme. For example; A species chosen to be spawned has a pop of 3048, by dividing (and rounding if that’s possible) 3048 by 500 the game would get a possible range of 1-6 individuals. If the resulting number ends up being less than 1 it would just default to 1.

  3. Just Hard Limits
    In the event that my ideas above are inconceivable, too difficult to implement, etc; We could simply impose a hard maximum limit on objects spawned by the system. We would potentially need checks for some niche issues however, such as the system spawning more of a species than possible based on their population count. (Spawning 5 individuals when the species pop is 3 or something.)

Cooldowns:
In order to promote diversity and to prevent encounters from feeling too similar, we could impose a sort of cool down that would prevent the system from spawning the same species too often in succession. I have two different ideas on how we could make this work. Note that these only really apply to cells and not compounds. Compounds probably shouldn’t have cooldowns.

  1. Basic Cooldown
    By temporarily disabling a species from being spawned, we could exclude them from the possible spawns after the player recently encounters them. This would force the system to spawn anything else until the player moves on and the species becomes re enabled. We would have to carefully make sure this works exactly as intended because I have a strange feeling this would break often for some reason.

  2. Tiered Priority:
    This method would grant species an increasing priority based on their population. This priority would increase each time the spawn system is triggered, and reset to 0 each time the species is spawned. This would allow for more populous species to be encountered more often but still allow less numerous species to show up as well.

I know these ideas may be messy but open-world spawning logic is rather unfamiliar to me. I have provided these concepts regardless in hopes of furthering this discussion, and possibly providing a foundation for us to build from at the very least. Let me know what you think.

2 Likes