Dev Journal: Forethought

Mixture of good and bad news with recent development. I’ve been putting this off wanting to be in a better spot, but I’m trying to be better about posting dev logs more often and escaping that weird cycle I had going of only posting at the same two points in the cycle of developing a release. I do have a fair amount to talk about by now, even if I’m not where I’d like to be.

I did go ahead and commit to finally getting the AI Overhaul started after my last update went out. Most of the time since then, I’ve been working on figuring out exactly how to actually build an AI system I’ll be happy using throughout the development of this game. Let’s take a minute to talk about how constructing a system like this even works, in terms of converting very rough ideas into actual functional code, so I can give a better idea of the actual progress made.

Stages of construction

I’d been working on the first stage for a long time before the last update come out: developing and refining mental models for how to convert everything I understand about how people and creatures work into something that can actually be processed with math in a reasonably efficient manner. This is the most abstract stage, but I have to project a lot into later stages to figure out what approaches would be most efficient for computer resources and my own work-hours. This shapes all later stages of construction, as well. When I started this dev cycle, this started expanding into design documents and pseudo-code to better nail down how things would actually function and spot problems or gaps as I explore the logical details.

For the second stage, I develop the system for parsing spreadsheet-based content into useful game assets. I’ve gotten some practice doing this with the text content of PWO and Project Voice, and I decided that for this system to really be appropriately flexible and expandable in the future I’d need a system where the structure of “how pieces interact” and the actual arrangement of all the pieces were set up separately. That was one of my big regrets with the existing AI system: everything is hardcoded together in one big blob, and changing one element of how the system works requires many tiny changes, with various exceptions and complications coming out of that. So the second stage means figuring out how to standardize all of the necessary pieces into minimal data points that can be read out of a spreadsheet and implementing that conversion.

Once I have the system for preparing pieces of logic content, I need to build the actual system for running these pieces and how they interact with the rest of the game. This includes how they pull information from the game, how they process it according to the directions of the logic content pieces, and how they actually apply it to the game. Where the logic content form the instructions, this is reading, interpreting, and applying all those instructions.

And after all of that framework is set up, I’ll be ready to actually build the logic content itself, to try and write out instructions for all the different situations in such a way that the characters can robustly interpret what’s happening and make decisions based on their surroundings and their internal situation.

So when I say I’m working on building the AI, there are a lot of different layers to it and systems that need completing both to get it to a basic, functional state in the short term and to set it up to be expandable and improvable in the future without being a nightmare to work with.

sections of the mind

Well, surprising no one, making a robust, ambitious AI like this is hard work. I know AI is a big deal in the news these days, but that’s a different sort of system: models based on “teaching” a randomized series of nodes some task through random alteration, testing, and selection has made huge leaps and bounds lately, but this is a different kind of AI: I’m trying to handcraft a system that can emulate behavior from bottom to top, in a system that allows for plenty of easy tweaking, refinement, and expansion as I develop the game further. This is one of the classic great challenges of programming, and if I were trying to make it talk or get into really abstract ideas I might as well write it off as a failure from the start, but I’m aiming for a simplified version of sentient behavior focused more on interacting through a very limited set of inputs and outputs. It’s still a big thing to aim for, but I’m trying to find a good balance to enrich PWO and make it feel unique without just using up all my sanity chasing mirages.

I’ve spent a ton of time in the first phase, trying to make projections into the later phases for how things will work, and it’s clear that trying to get all of that built in one version just isn’t going to happen. The tough part is, I can’t just finish one phase and ship that as a useful update– that will change nothing visibly. So to keep updates coming out without too much time between them, I have to divide the new AI system into segments I can run through all the phases in a shorter time.

My rough plan on that front is to start off with building the system for interpreting the world. That might be the weakest part of the existing AI, and I’m hoping that if I can build and finish all the phases described above for just the information input, then plug all of that into the current AI system, you’ll be able to see a significant improvement– the AI will be less “forgetful” and less likely to lock into weird paradoxes or self-contradictions, it should have more memory and be better about understanding what you’re trying to do.

That will be one update. Next, I’m hoping to build out a basic logic system for actually choosing actions intelligently, so characters can use more robust logic to make choices. It will still be short-sighted, but it will be better suited to things like recognizing it can accomplish one goal many different ways, and choosing the best action for the moment as needed. In general it should be more aware of what’s happening “now.”

After that, I want to tackle the ability to plan for the future and separate one goal into many steps it tries to execute. A full appreciation of the past and future is pretty complicated, but I’d like to set it up to allow characters at least a decent capacity to plan, and to adapt to events as they go to keep moving toward their goals for the future.

By this rough outline, the last major thing to include before the proper AI system, at least in a basic form, could be considered complete: a system for handling emotions. Characters shouldn’t always be logical, or driven purely by physical needs. They have emotional needs, and sometimes emotions should overwhelm their own self-interest and drive them to act unpredictably. This will add some chaos, but hopefully it will also add a stronger sense that there’s “someone there” when you interact with the characters.

Where are we now?

That’s the plan I have for the future at this point. I’ve laid out a lot of important ideas and I’m growing more confident with the system as things start to feel more solid, but there’s still a mountain of work to do… and it’s taken quite some time to even get this far. I thought I could aim for getting the first chunk of the AI, the input system, set up for the next update, but as I started building the next phase for it, I started slowing down. It was too much abstraction for too long, and I was struggling to keep a healthy work cycle going.

So I’ve decided that for now, I’m going to put the AI aside and focus on some side stuff, to give myself a break. I’ve made a lot of progress with design, but it’s still a long ways to anything playable, and I want to get another version out soon, so I’m shifting gears. There are only so many elements coming up in development that won’t be reliant on the AI in some way, but there are a few things somewhat connected to each other that I think will make for an enjoyable, lightweight update.

I’ve had a lot of requests for more upgrades of various kinds, and I’ve been wanting to add more myself, but more upgrades can make it harder to find the ones you actually want, and can eventually lead to making your character overpowered past any enjoyment. I’ve had a solution in mind for some time, but it requires two other features that it seems like you guys will also be pretty excited about: a revamp to the game’s system for menus, and at least a basic implementation of a save system.

So those three changes are what I’ve set my sights on for this update at this point. I’ve been working on a new menu system with a separate GUI, both to make the upgrade process more flexible in design and to open up the initial game setup menu to be both easier to use and easier to expand without overwhelming the player. I’m still looking into my options for setting up saves, that’s something I’ve been a little leery about both with working with Unity in general and with setting up anything that might be usable from one version into the next when the game is in such flux. I’m not sure yet if saves will be compatible between versions, but hopefully folks will at least enjoy being able to play sessions across multiple days… without just leaving their game open the whole time.

Those will tie together pretty tightly with a revamp to the upgrade system, which will hopefully make the game more fun to actually explore and come back to in general! I have a lot of ideas I’m looking forward to trying out on that front, and it should make for a nice, fun romp through regular game design before I go back to trying for the crazy stuff.

There’s still a lot of work to be done, but hopefully it won’t take me long to ship at least a fairly basic update, with some significant quality of life improvements that you all have been asking for. I hope you’ll enjoy, and thanks for reading!

8 thoughts on “Dev Journal: Forethought”

  1. Hey Lith, I hope this is a good place to put a bug report. Maybe you can focus on a lil hotfix for this while putting AI aside: In all versions of PWO that include vore, Unbirth and Anal Vore do not damage the creatures you consume, nor do said creatures do any damage to the player should they consume them in the same way, is that intentional or is it a bug? Because I don’t see why you would even use those two options given they don’t even give exp. Allowing creatures to be digested in UB and AV would help. Sorry about my little rant.

        1. Thanks for checking in, guys! @3@/ To respond to all three comments:

          1. The game doesn’t support customization for digestion vs. endo currently, so I offer a mix of both intentionally. Unbirth and anal vore are the most common non-dangerous options for vore, and some players will enjoy having “safe” vore options. It’s not as directly beneficial as digestion, but still has some gameplay benefits. Customization for what various vore destinations “do” is slated for down the road in development.

          2. Bug reports are acceptable here, on discord, or at my email.

          3. The Discord server is not supporter-only. Supporters get a few bonus perks on the discord.

          Cheers!

  2. Would it be possible to make a freind who you could travel with and help you out?

    If you’re extra nice to a NPC and they follow you or you get the option to ask them to follow you?

    I’m thinking that it could be expanded into forming groups or gangs later on with freinds and enemies.

    Just a thought.

    I’m enjoying the current build and looking forward to the next update. I don’t know about others but just having a save function would keep me happy for the rest of the year! It doesn’t need to be fancy or be backwards compatible with previous versions or have a loading function for multiple saved games.

    Just a basic function to save the state of the game on closing and resume on reopening is plenty for now. (For me anyway)

    Great game, great progress, great responses to comments and hopefully also a great future!

  3. About AI, I think you can take the AI from “The Sims” for reference, the way that its design reduced the need for hardcoding, there’s a video on Youtube explaining how it works and I thought you could take some inspiration from it.
    Here’s the ID for the video ” 9gf2MT-IOsg ” or “The Genius AI Behind The Sims” made by GMTK.

  4. honestly, this puts the radiant AI to shame…
    you’re doing great, just keep at it when you feel it, and take personal time whenever you feel you need or just want it.
    i know you can do it.

Leave a Reply

Your email address will not be published.