Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Anime sandbox npc logistics simulator idea, no will to finish

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
7,238
Location
Poland
Strap Yourselves In Codex Year of the Donut
Posting as a new thread since this doesn't belong anywhere.

Last year got the idea of a title with NPC economy simulated to each item's detail, with no make-believe "new shipments" never present in gameworld.

Having a production chain, as in RTSes, NPCs with their own workshops, houses, items on them and in storage -- task the NPCs belonging to a settlement into producing goods.

That came up after playing too much Falcon 4.0 variants, that in addition to a flight sim has a strategic map with units that exist persistently, never pop up outta nowhere, interact with enemy units, etc. Within the leaked Falcon 4.0 source code exist separate ground and air tasking units that actually create missions.

Another game I played at the time was Stalker: Clear Sky with its outpost popamole part, but that was so poorly implemented really deserves for proper implementation, and adding depth to the experience.

Question is what kind of gameplay could be added to Generic RPG Universe Sim. Maybe "Mount and Blade"-style roaming party style. Or procedural quests for a faction or few. Or a war sim like Falcon 4.0 was.

Obviously the simulation could be attacked by the player that could incline to, say, murder all current butchers and NPC peons assigned as next butchers, etc. Which itself is good as long as doesn't lead to obviously absurd behaviors of the economy as a whole.

Writing the code, not to mention making assets serves no purpose, really. If wanted few minutes of fame, there are fuckton of other projects begging for help. This one has no demand. The hardest part would be making assets, animating and mapping them.

Minecraft had it easy, its premise can be explained within typical short attention span.
 
Joined
Jan 4, 2014
Messages
795
This reminds me of X2: The Threat or any X-series space sim. In fact, I'd say those series of games have already done this. It's possible in that game to kill a supply chain, although ships and products will always reproduce. For example, you can kill most every station's producing capacity that's below the level of a shipyard by starving it, but you can't stop the production of ships or the respawning of destroyed stations/ships - which're what's important. By starving stations all you do is change the economy of that place, but you don't stop that place from being just as strong as it ever was. The dynamic economy is really just a fun little side-game which encourages you to find new trade runs rather than to stick with just one.

1. Need food
Spawn points for Native plants or trees which grow on their own and produce edibles and seeds
Ability to get high numbers of viable seeds from one plant
Ability to know how much a plant yields (and in turn how much its seeds will yield)​
Spawns for animals - like deer and wolves - which produce meats/hides/furs/fats
Spawns for fish in the oceans, seas, rivers and lakes
(. . .)​
2. Need NPCs to harvest, plant crop and trade with merchants
Need pathfinding code for NPCs
NPCs need to know where the food spawns are so they can harvest produce or seeds
NPCs need to know where to grow hte crop
NPCs need to know where the merchants are so crop can be sold or exchanged
Need (dynamic) supply/demand code to determine prices of goods on merchants
(. . .)
I have to eat now. I've also always been itnerest in this. There're tons of programs and games which do similar.
 
Joined
Jan 4, 2014
Messages
795
OP, you might find this a veyr interesting read (I am):
http://www.raphkoster.com/2006/06/03/uos-resource-system/
http://www.raphkoster.com/2006/06/04/uos-resource-system-part-2/
http://www.raphkoster.com/2006/06/05/uos-resource-system-part-3/

I like this section, from part 2:
Most of this is actually fairly straightforward, in terms of AI implementation. The basic AI behavior of a creature was
  • If I’m hungry, search for items that produce stuff on my FOOD list, and attack or eat them. Wander as far as needed to accomplish this.
  • If I am not hungry, then start looking for a home base. If I already have one, then go there. If I get hungry while doing this, go back to hunting for food.
  • If I am sheltered and not hungry, then look around for stuff that I just like. If I can pick it up, bring it to my shelter. If not, just hang around there — until I get hungry.
At one point, we had effects like beggars who had desires for GOLD, and thus followed rich players in the street. We had bears who would hang out in their cave, but would wander over to hang around near beehives. All that stuff worked. The problem was that the constant radial searches were incredibly expensive, and so was all the pathfinding.

One of the first things to go was the search frequency. Next, the step was taken to put every creature to “sleep” when players were not nearby. This change alone really ruins the large-scale ecological applications completely. On top of that, the issues with spawning “overdrawing” the bank were not foreseen; in practice, it wasn’t MEAT that resulted in creatures not spawning. It was all the FUR and whatnot that ended up hoarded by players that prevented the deer and rabbits from returning.

The last big element, however, was that there were a fair amount of team members who saw the whole system as a boondoggle, and not worth pursuing. Alas, one of them also ended up in charge of implementing it in beta. By beta time, systems that used to work in alpha no longer did.

This meant that we never got to the second stage of implementation on it, which would have been hooking it into quests. But I will talk about that next time.
This was taken from the comments below the Part 2 link:
  1. MikeRozak says:
    June 4, 2006 at 2:14 pm
    "The last big element, however, was that there were a fair amount of team members who saw the whole system as a boondoggle, and not worth pursuing. Alas, one of them also ended up in charge of implementing it in beta. By beta time, systems that used to work in alpha no longer did."

    Funny how stuff mysteriously finds its way (or not) into the final code…

    The question I want to know the answer to is this: Why hasn’t anyone implimented your AI/ecology since? Some possibilities:

    1) It really was a boondoggle.

    or

    2) The broken implimentation scared everyone off from the idea, much as Tron scared movies away from heavily using computer graphics for 10+ years.

    or

    3) Most players just want to kill wolves and dragons that always respawn in the same spot and mindlessly wander about in the same 10′ x 10′ area.

    Note: As a partial answer to my question, I’ll point out that Obilivion has somewhat similar mechanics for their NPCs… sleep, eat, work. The extra complexity makes quests a bit more interesting, particularly when thieving.

  2. 3b4c3c3ac0a0cd864a66cb984908cf6a

    Raph says:
    June 4, 2006 at 3:07 pm
    The Sims ended up addressing the radial searches by simply reversing the model: instead of the entities constantly doing searches, the entities instead broadcast their production values to things nearby.

    Pathfinding, alas, still costs a ton, because of the increased complexity of the environments.

    One approach that may be fruitful is again demonstrated by the Sims — having a fine grid with fall-off from broadcast sources. Then the pathfinding can fall back from A* to simple hillclimbing.


    Mike, I think the answers are inertia, complexity, lack of seeing the benefits, and desire by players for predictability.
 
Last edited:

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
7,238
Location
Poland
Strap Yourselves In Codex Year of the Donut
It's very proper that the guy used a hierarchy of needs for the purpose of game AI with dynamic goals. Even something as primitive as the Anno series needs could be used as a start.

What's missing, or at least isn't described here is "society"-like organized behavior, with NPCs taking up roles and having it setup for illusion of cooperation over the goods production and consumption.

It's amazing how these old games like Ultima and Falcon 4.0 had time for experimental stuff like that, and none of the follow-the-leader principle. Maybe it's since games didn't have as established genres in the old times.

Other than a hobby project in need of a stable release with few bugs remaining that eats up too much free time, I've been thinking of realizing this one for too long now. There's an enthusiastic guy who does Photoshop and having other people's involvement sure helps get motivated and finish it actually. My Radeon fried two days ago so it's time to focus on 2D stuff and none of the popamole for the time being.

Too bad UO animal population control stuff got scrapped since players didn't care for it.

Pathfinding costs a fuckton, yeah. Then, either some modern high-level mesh between grids, or even hardcoded movement atop AI-built roads, which actually adds to the illusion of organization.

Hooking up quests for this basic framework needn't suck actually. For one, sabotaging faction's settlements and watching them die is great fun. Or storming the towns with AI troops and watching them kill everyone.

Actually books like "game programming gems" or "game wisdom" have fun stuff that deals with basics and none of the "run engine X, profit" stuff. Norvig's PAIP has fun stuff too. One of the game books had anecdotes from developers of old innovative games, amazing.
 
Last edited:
Joined
Jan 4, 2014
Messages
795
I really need to read those 3 parts completely before I can comment fully, but....

I like your comment about the need for society-like organized behavior, instead of random-ish individual animal behavior. Instead of looking like they're all acting independently of each other it needs to look like they're working together. Hmm.

After reading a few minutes, I see in part 1 it says the AI's had these 3 motivations:
1 Food
2 Shelter
3 Desires

And then it says this:
You’ll notice that this is darn close to ripped straight out of Maslow’s Heirarchy of Needs. And in fact, AI attempted to satisfy its FOOD needs first, followed by its SHELTER, followed by its DESIRES, just as in Maslow. Alas, we didn’t get around to allowing our AIs to have self-actualization.
It gives an example of what a wolf will look like:
  • PRODUCE FUR in a medium amount, and doesn’t regrow it; and CARNIVOREMEAT
  • EAT MEAT, up to a small stomach size, in medium bites.
  • SHELTER in TREE or CAVE, but treat CAVE as home if they’re a decent size
  • DESIRE nothing, but have an aversion to anything that produces CARNIVOREMEAT
Now then it says something about society-like behavior, here:
Stuff like pack behaviors were layered on top of this, so wolves, being pack animals, could have a DESIRE to be near other wolves. When animals were in a pack, they were supposed to add up their needs, so that a pack of wolves would start ignoring bunny rabbits and start being willing to tackle bigger game.
Somewhere in that I think lies a clue to the society-like behavior which is sought.

Lastly want to say many games have experimented with these things. In my first post here I gave X2: The Threat as an example, but many of the games in that series were examples. I know of many other games as well which have attempted similar things. Dwarf Fortress is probably one of the most well known. It actually simulates the history of the world the player starts in. All of the creatures in the world have a simulated family tree. The dwarves build settlements and war. Some of the creatures are renowned for killing dozens or hundreds of other creatures in their lifetimes. And yet Dwarf Fortress isn't the only game to simulate independent entities with their own desires. I know I've encountered too many to list here.

I think one of the reasons this stuff doesn't receive much more attention than it has in gaming is because it's results which matter, not how something gets to them. If I handmake a quest with a clever twist and a brilliant story then it's just what's expected. If I however make a simulator which does the same thing yet requires 100x the work and/or 100x the cost then it's swiftly overpowered by the desire for results at minimum cost. So what we get is handmade quests instead of quests which emerge from a simulated soup. I also think it's impractical a simulated quest will be equal to a handmade quest, even with 1000x the work and/or cost.

If that's all there was to it, nobody would attempt to make simulated societies or entities, since handmade specimens fair better. Obviously, many of us have a desire to attempt these things or at least experiment. We're like those people who tried to make flying machines but they still failed miserably, until the Wright Brothers came along. It reminds me of somethign I've read and it goes something like this: For every 1000 bad ideas there's one good one. Basically, if we never tried to do what nobody had done before then there'd be no explorers, no innovators, no eureka moments, and very likely, no future for us at all.

I believe in the longterm simulators have great value in creating virtual worlds, but only insofar as what they create is competitive with handmade content. For example, creating sweeping landscapes with fractal algorithms is an example of popular simulated content. Fractal landscapes are extremely common in games because handmaking landscapes requires so much time with little benefit. As algorithms and understand of simulated content grows, I expect more and more contents to be created this way.
 
Last edited:

crufty

Arcane
Joined
Jun 29, 2004
Messages
6,383
Location
Glassworks
go for it!

maybe the thing is to split production into skilled trade vs unskilled labor.

one could assume enough villagers can always produce the goods that unskilled labor can produce.

steal away the skill--and those goods, once consumed, are gone. Kill off the town mage and...
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom