Over the course of developing my game I’ve decided to implement a logic system that lets me handle lots of unique inputs and then eventually passes them onto unique outputs, not unlike an electrical circuit.
This system has proven really powerful so far! It’s let me create a few really cool scenarios for my game with the ability to quickly add and change the events that take place!
Heres a few examples of the things I can do with this.
Doors with unique particle effects, camera shakes (and sounds too, despite not being shown.)
Environment changing events
Tricks and traps!
Basic inputs and delays
This system works via a series of nodes that operate by taking various inputs the player can perform and working through its node system to its eventual outputs.
Nodes so far;
Entrances:
- InteractEntrance
- DestroyedEntrance
Connections:
- AndNode
- XorNode
- DelayNode
Outputs:
- InteractExit
- ParticleEffect
- CamShake
- Animation
- SoundEffect
Theres plenty of room and flexibility to add more nodes here, and its actually fairly simple to add more.
The problems I’m currently facing
Using attachments as Nodes and beams as Connections is an incredibly useful method of creating these circuits in a 3d space. But this starts to become a real problem with multiple circuits, as maintenance and readabilty fly out the window.
There are 3 individual circuits in these folders. Not all of the circuits have their exits visible here, and none of the entrance nodes are present.
- This means that I have no viable way of copy/pasting circuits, because I have no method of properly grouping them.
- If a problem appears in a circuit, I have to sort through each individual beam object to find the proper connection between 2 nodes.
Reasoning for current layout
- At run-time, the logic module sorts through all the attachments/beams to create a list of all the Nodes.
- The module then creates the necessary NodeObject and enters that into an array
- The Nodes are then linked via their Connections (Beam attachments) as either an Input (Attach0) or an Output (Attach1)
- All circuits have been fully found and set up, ready for execution, even if they’re not parented to the Links or LogicPoints folders.
Aims with this system
Eventually, I’d really like to release Brutal’s framework. I know I can make a lot with it, but I also know there are people way more talented than me on this platform. The aim is to keep everything code-wise simple/adaptable, so even people with little confidence in scripting can utilize it.
While I’m happy to use the event system as I have it, a public release in this state is unthinkable.
Feedback/Discussion
I’m really looking for methods to find ways to properly group these Logic circuits in their own containers, but I’m out of ideas on how to achieve this. Its a powerful system, but its also got some pretty hard limits in its current state.
Thanks for reading this far, really keen to know what your thoughts are on this system, what you’d do with a system like this, and if you’ve got any experience with similair systems!