[6] Super project

Youtube | Twitter

I spent the last couple of weeks getting accustomed to GOAP. The first version I managed to get running was pretty half-arsed. I was flying by the seat of my pants and as a result, many aspects of it were not properly implemented. I now have a better understanding of how it works, though, and as such have been steadily improving things as a whole! The code has been cleaned up and further generalized several times over and I’ve also got most (if not all) of the main features of GOAP fully implemented.

The last major feature I added is agents having multiple goals and the necessary logic to choose which one of them to work on. That logic revolves around costs. You can think of the costs as a representation of the agent’s decision-making ability.

In this video, the deer have both a hunger and an idle goal. The hunger goal starts at 1 while the idle cost is 10. This means the deer will choose to idle since it has the highest cost. However, once the deer gets hungry, that hunger cost shoots up to 15. This causes them to stop idling and instead work on finding something to eat.

However, that’s enough of that! It’s time to move away from deer simulator 2019. I was originally going to take the simulation further to continue ironing things out but have decided not to. The whole point of this detour, after all, was to get a functioning version of GOAP up and running. That goal has now been reached. Instead of wasting more time with continued debugging we’re going to move onto creating things that matter.

What matters, though? I thought about that for a good awhile. The answer I came up with is gameplay. That might seem like an obvious (and vague) answer but allow me to explain. The goal here isn’t to fake what I’ve been loosely referring to as civilization just for the heck of it. To me, these recent efforts with GOAP are just a means to an end. It’s the first of many complex but ultimately minor background systems that will eventually help bring us towards the goal of a world that doesn’t just feel alive but is alive.

The current plan is to breathe some life into my little hive of scum and villainy. The city already exists due to some previous work but it’s empty. I’m going to remedy that by spawning a variety of agents throughout the city and just letting them go crazy. I don’t want to spawn things in such a gamey way but I don’t have much choice right now. The foundation for more intelligent placement isn’t built yet but we’re getting there!

I don’t think I ever told you why I wanted to use GOAP, though! Its usage brings a whole bunch of neat bonuses but that’s all they are to me. These bonuses, such as the long term maintainability, while nice, isn’t that big of a deal in the grand scheme of things.

The thing I care about is the unpredictability that will come from the agents being given the ability to solve problems on their own. I plan to work with this unpredictability instead of against it. The long term plan is to take advantage of the chaos being caused all by these agents interacting with their surroundings and use it to drive the gameplay. The agents will inadvertently be acting like a bunch of little dynamic quest generators. I’ll be recording their activities and then pull from that history to generate content. This will help achieve my goal of a game full of meaningful content without relying on typical generation methods. Instead of generating missions out of thin air they’ll be made in response to genuine events that have or are happening throughout the galaxy.

This is, in my opinion, vital to the end goal of the player (or agents) being able to affect the galaxy in a meaningful way. Having action and reaction tightly woven into every part of the gameplay will help bring us towards that goal. I’m nowhere near accomplishing such a thing but with GOAP out of the way we’re a lot closer than before!

The reason for this obsession with an organic setting, by the way, is due to my lengthy back history playing all sorts of sandbox games. I’ve come to realize that most if not all of them are ultimately shallow and it’s something that annoys me. That freedom stops being interesting when you realize its only skin deep. It’s just not enough on its own.

Let me give you a better example to help drive my point home. My grand conquests in Terran Conflict started to feel pointless once I realized my actions don’t change the status quo. That’s because the state of the universe is set in stone. The sandbox is an illusion maintained by a bunch of AI pretending to do things that matter. There are factions waging war even though they never trade territory. There are traders trading even though the economy doesn’t matter. Pirates are pirating even though they don’t need the money and never use the things they steal. The player can’t capture sectors, defeat factions or even permanently destroy space stations. The most egregious offense is that space stations are respawned the moment you leave the sector! The game presses the reset button if you do anything that might interrupt the illusion.

I don’t think the factions even need resources to replace losses or do anything in general which further damages the simulation as it means the economic aspect of the game exists just for the player. This as a side effect now means that you can’t damage a faction by raiding it. They will continue to pump out ships if you destroy all their shipyards. Fleets can jump even if they don’t have any energy cells. I’m not specifically sure how much is faked so some of what I just said might be false – but enough of it is faked that it had a trickle-down effect that tempered my ability to enjoy it.

I want to avoid this kind of illusory sandbox which brings us back to my original point. The gameplay. I want to ensure it doesn’t get lost in the noise. I plan to accomplish this by creating a setting where things matter. The sandbox and all the bells and whistles that come with it are being built to support the gameplay rather than serve as it.

I have a lot of other things to talk about but it will have to wait until next time. Feel free to come back for part 7! I’ll actually have some stuff to show you.

3 thoughts on “[6] Super project

  1. I’m interested in GOAP approach but found it really hard to debug!
    My suggestion is to create small “areas” (like with deers) where you can observer behaviour and how agent behaviour affect the area, create new situations and so on.

    An example could be add wolfs to the mix. With a small area, wolfs eat deers, deers eat plants and so on. Wolfs fight to create a leader, leader decide if stay in this area or move in another area.
    If you are able to measure these interactions, give them points and automate them (like with unit testing, but with area testing), you can parallize (with no graphics, only simulation) a lot of scenarios, measure them, do fine tuning on behaviours and move on.

    Note: this interaction or fun points it’s similar in Rimworld, when storyteller detect that is time to create a new disaster, it does! But instead of Rimworld approach, where storyteller is “agent” outside of the world, your approach is to equialize all agents, no one is god and decide for everyone, neither the player

    If you are able to do this, IMHO, you can improve each release and being able to keep interesting interaction in place, interaction that change the area, move agents around, create new quests and so on..

    For the history and “invisible hand” behind open world, I agree, it’s a limitation because today’s games are build to be fun and even if they are openworld, they are build with specific subsystems in place.
    If I understand correctly, your approach is more: this is the world, add agent, run 10 years of interactions similations that build history THEN add the player. This is of course unpredictable how much world is “screwed” and what player will be able to do, right ? But this is of course for me very interesting and fun.

    Like

  2. I’m interested in GOAP approach but found it really hard to debug!
    My suggestion is to create small “areas” (like with deers) where you can observer behaviour and how agent behaviour affect the area, create new situations and so on.

    An example could be add wolfs to the mix. With a small area, wolfs eat deers, deers eat plants and so on. Wolfs fight to create a leader, leader decide if stay in this area or move in another area.
    If you are able to measure these interactions, give them points and automate them (like with unit testing, but with area testing), you can parallize (with no graphics, only simulation) a lot of scenarios, measure them, do fine tuning on behaviours and move on.

    Note: this interaction or fun points it’s similar in Rimworld, when storyteller detect that is time to create a new disaster, it does! But instead of Rimworld approach, where storyteller is “agent” outside of the world, your approach is to equialize all agents, no one is god and decide for everyone, neither the player

    If you are able to do this, IMHO, you can improve each release and being able to keep interesting interaction in place, interaction that change the area, move agents around, create new quests and so on..

    For the history and “invisible hand” behind open world, I agree, it’s a limitation because today’s games are build to be fun and even if they are openworld, they are build with specific subsystems in place.
    If I understand correctly, your approach is more: this is the world, add agent, run 10 years of interactions similations that build history THEN add the player. This is of course unpredictable how much world is “screwed” and what player will be able to do, right ? But this is of course for me very interesting and fun.

    Like

    • I’m just kind of winging things, to be honest! I have some plans but they’re pretty vague. I’m just doing my best to work towards them. Your right about most of what you said, though. And yes, goap is a pain to debug. Everything is so disconnected that clear lines to follow do not exist.

      Liked by 1 person

Leave a comment