Split experimental code and canonical code

(Marco Fruhwirth) #1

We should talk about how we tackle more complex changes to the Evoli code, without blocking momentum of the development. At the moment, we have a very basic set of behaviours (avoid, seek, wander, …) and creatures (carnivores, herbivores, plants) that are not entirely finished. Those will form the “canonical” gameplay experience and the implementations need to stay simple so that we can implement actual gameplay & balancing.

In addition, we have “experimental” creatures and behaviours that will not interact with the “canonical” gameplay experience.

We should split the code accordingly so that experimental code is split into “modules” or one “module”. For now, that would be separate folders. In order to use those experimental creatures, the components need to be registered and the systems need to be added, other than that there should be no calls into the experimental “module”
The call sites should also add a comment that the added system is experimental. We might be able to enable/disable those systems the same way we can toggle the debug systems.

@sunreef It would be great if https://github.com/amethyst/evoli/pull/68 would already implement that structure. I propose that you move all your changes from that PR there, even if, as you said, they might make existing components/systems obsolete. At the moment the systems you added are ‘dead code’, as they are not interacting with any of the canonical code.
If you plan to use them for the canonical code, please create issues outlining the changes, so that we can discuss how they relate to others in progress issues (e.g. avoid behaviour)

1 Like
(Erlend Sogge Heggen) #2

The intention behind starting off all new creature designs as non-interactive is to lower the barrier to entry and encourage experimentation. Naturally we want these experiments to eventually turn into canonical features, therefore the process from experimental (non-interactive) to canonical (interactive) needs to be clarified.

The implementation of Ixies is an excellent opportunity to come up with helpful standards for both ourselves and new contributors. With the addition of a perception system we’re suddenly not talking about a non-interactive implementation any longer https://github.com/amethyst/evoli/pull/68#issuecomment-493419588:

I implemented this perception system with the Boids algorithm in mind.
The creatures would try to get close to other creatures of the same species and avoid predators or other dangers.

I think any PR that even begins to prepare an experimental creature for inclusion into the “canonical gameplay” should be preceded by (or at the very least coincide with) a design discussion. The purpose of that design discussion is to determine how the new behaviour introduced by a new creature will interplay (technically and gameplay-wise) with the status quo.

So I’d like @sunreef’s outlining of these changes to start as a topic here in #showcase:evoli, answering questions such as:

  • How will we make the boids algorithm compatible with our existing steering behaviors?
  • Will Perception apply to all creatures or just Ixies?
(Victor Cornillère) #3

How will we make the boids algorithm compatible with our existing steering behaviors?

I intended to replace the current steering behaviors with Boids.
Boids algorithm is generic enough that we can describe very different behaviors only by updating the rules that apply to each creature. Defining a new steering behavior would become a matter of implementing the appropriate rule.

Will Perception apply to all creatures or just Ixies?

Perception has already been added to carnivores and herbivores as well. It doesn’t do much for now but once we start adding systems that use it, it should be used for every sentient creature.

(Erlend Sogge Heggen) #4

Right. That sounds like a pretty radical change, so this would certainly benefit from some deeper design discussion before getting further into the weeds of the implementation. At best it could go live in v0.2.0, assuming we agree it’s worth it.

:spiral_notepad: Creature Playbook addition: The transition of a creature from experimental to canonical should always be targeted to a major/minor release.

But here’s a thought: Instead of trying to fit the Ixies into the three-way world of the MVP, maybe Ixies could have an interactive world of their own. Ixies are effectively living in a different dimension, where they have their own neighbouring creatures to deal with, e.g. flowers that need to be pollinated. That’d be all we need to start iterating on an increasingly novel mutualistic relationship between two species.

This might be what we want to do with every new creature type that brings with it some radical change.

Lastly, I like the idea of throwing this kind of stuff at our parallel ECS to see how well it can cope.