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.
-
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. -
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. -
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.
-
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. -
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.