NokiMo
CarnalSouls
CarnalSouls

patreon


Dev Diary #29

Hey guys,

There's been some good progress made on the Body system. It's a big and tough nut to crack, but Goldie and Crimson have been chipping away and getting us places. Attached is a screenshot of a custom-built interface inside Unity for us to build and debug bodies inside the Unity editor. It's taken a lot of work, and is by no means finished, but it's so super cool that I wanted to share it with you all.

I've also asked Goldie to talk a bit about the Body system here, as she's heading up this module she's much better equipped to talk about it in detail.

Goldie:
Let's start from the hard requirements - we need some way of being able to interface with the Body as part of a PlayerCharacter, and we've already constructed a Facet GetProperty system which is being used by the UI and the battle mechanics to get and set properties already, and is a good place to hook in the Director and Producer functions. So it would be ideal if we didn't have to make a second interface for the Body parts - those should really be able to be communicated with via the same API.

Next, as we're looking for a complex body, the only way to reasonably represent this is as some kind of tree structure. It doesn't have to be a tree - it could be a list, but each BodyPart has to be able to maintain parent-child relations to be able to logically connect, for instance, a Knot with its Penis.

Cutting a long story short, it just so happens that Unity uses this very same structure (a tree) to represent its GameObjects, and can provide us with a method of automatically handling parent-child connections, and allowing us to easily observe the state of a Body in the Inspector at any point. It's also automatically Serialisable, meaning it can be saved into scene data, and (IIRC) saved properly at a later point.

The complex depth of the Body system means that the classic GetProperty tagging method (using Attributes) isn't going to work, so it does need a custom BodyFacet to translate the tree structure into a flat list of methods that can be called to get and set each variable.

Eventually this BodyFacet should also handle exposing the Add and Remove methods so they can be programmatically performed as needed, though right now that's a little over the horizon (How to do this without requiring refreshing the entire FacetProperty structure in memory for the newly available functions is a possible concern). 

There's still some work to go on this topic, though - it's very fresh, but has easily the cleanest and simplest implementation I've come across on this so far.


Until next time!

Dev Diary #29

Related Creators