Mythruna
April 26, 2024, 05:46:42 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Global Resource Dependencies...  (Read 14757 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: July 06, 2012, 10:29:01 PM »

Playing around with global resource dependencies which will ultimately be the high-level goals/planning for the individual NPCs. I've hacked the AI tester to let me place little towns and their various resources so I can connect them together and test ideas. I thought this picture looked kind of cool and I hadn't posted anything in a while.



In a way this is kind of like writing a really simple world building game like civ or sim-city.  And maybe it's semi-fun to play with on its own when I get further along.  I'm trying to get it to a point where I might post a release up on the donators section of the forum.

The idea is that towns have a sort of internal set of resource dependencies.  The wood cutter puts hours into the forest to produce raw lumber... but he needs food, shelter, and the occasional tool.  This means that the town has to have food and tools either through imports or by growing/making it locally, and so on.

Mapping these dependencies out (it will be automatic in the real game) allows me to know when they get broken and to have the town reason about what goals it might give its citizens to fix the problem.  For example, if the forest burns down or some griefer clear-cuts it then the town will know it's not meeting its wood quota and can plant more trees and temporarily see about importing the lumber from some other town.

It's the town to town dependencies that will be really interesting.  If some handful of other towns were relying on those wood shipments now they must do without... which maybe means that the shipyard shuts down and no new ships get made or repaired for a while... and so on.

It extends to more than just industry, also.  If I get my way, the whole world will be a balanced mesh of dependencies... including things like the wolves and the little woodland creatures.  So if you clear-cut a large section of the forest then the wolves will go hungry and may raid the town's sheep where otherwise they stay away from the town.  Or if you kill all of the wolves then the forest gets overrun with small mammals, etc. that then start to infest the town's storerooms, chicken coops, etc..

At least that's the theory. Smiley
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #1 on: July 07, 2012, 01:28:50 AM »

Amazing Picture-to-image work there. So I'm guessing the AI is going along smoothly? You should also put a Mine Worker so the blacksmith can make better tools for both the woodsman, and miner. If you ever play the latest Minecraft, you should get a mod called "Minecolony". It has basic AI, and is addicting in my view Smiley
Logged

Mythruna: Don't you dare read any posts I made before 2014.
Captain Bob
Newbie
*
Posts: 3


View Profile
« Reply #2 on: July 07, 2012, 05:58:22 AM »

It looks very much like Tribalwars. Just missing the dirt pit and the iron mine.
Logged
OcelotcR
Newbie
*
Posts: 8


View Profile
« Reply #3 on: July 07, 2012, 07:52:40 AM »

Amazing Picture-to-image work there. So I'm guessing the AI is going along smoothly? You should also put a Mine Worker so the blacksmith can make better tools for both the woodsman, and miner. If you ever play the latest Minecraft, you should get a mod called "Minecolony". It has basic AI, and is addicting in my view Smiley

I tried the mod out and i do agree with you its addicting.
The AI On there is good, but i bet on Mythruna itll be better.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 on: July 07, 2012, 08:20:18 AM »

Amazing Picture-to-image work there. So I'm guessing the AI is going along smoothly? You should also put a Mine Worker so the blacksmith can make better tools for both the woodsman, and miner. If you ever play the latest Minecraft, you should get a mod called "Minecolony". It has basic AI, and is addicting in my view Smiley

There will of course be mines and ports and shipyards and fishing and gardens and farms and chicken coops and sheep pens (though mythruna doesn't have sheep but some similar animal)... etc..

I'm just in the early stages trying to work out the math and algorithms necessary to keep track of the whole world this way without requiring a room of computers. Smiley
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #5 on: July 07, 2012, 05:06:47 PM »

Once a civilization gets enough tech to build airships: Awesome. Mid-air fights. Canons, or occasionally seeing an air caravan pass by Cheesy Or being hired to escort caravans would be nice. A major problem though... Since the world will be endless, will you make it so that if a village is far enough away, it will become inactive or slightly active? And kingdoms could have a farther inactivity range?
Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: July 07, 2012, 06:08:23 PM »

Once a civilization gets enough tech to build airships: Awesome. Mid-air fights. Canons, or occasionally seeing an air caravan pass by Cheesy Or being hired to escort caravans would be nice. A major problem though... Since the world will be endless, will you make it so that if a village is far enough away, it will become inactive or slightly active? And kingdoms could have a farther inactivity range?

Actually, that's more or less the whole point of this.

Point 1: when a town is balanced then no calculations need to be done at all.  I can assume that whenever you get near everything is just cruising along.  The game only need to worry about specific amounts of things at that point.  In other words, a town far enough from a player requires zero processing time.

Point 2: when a town is at the edge of the known world, the things it can't get from the known world can be exported/imported "over the horizon" to the towns that haven't been generated yet.

For example, in the process of balancing the town it turns out that it has an excess of lumber that none of the current towns need and that it cannot produce enough iron to meet its own requirements... and none of the existing towns can supply it.  So it sends its wood and receives its iron from some imaginary town that hasn't been generated yet.  When that town is finally generated then it has built in requirements for import+export that it must factor into its own balancing... and if it can't meet the export requirements then it can always import from the next imaginary town over the horizon.

By the time a town is generated to the point of being "resource balanced", the site of the town over the horizon and the road to it have already been decided.

And the benefit is that without that, a town becomes really hard to balance on its own just with known stuff... and the world becomes much more boring anyway because the chances are that towns would never import or export because I'd have to build some other slop into the system.

Point 3: towns don't just operate as a random collection of NPCs working through scripted motions.  This is ok for regular RPGs and it's possible that I could have generated towns that act this way... but what would have been impossible is letting a player create their own town that operated appropriately.  With this system, a player can interject at ANY point in the process.  All the way from helping an NPC rebuild his house after a fire, through running a cargo line, all the way up to creating your own populated town from scratch and managing it to prosperity.  At least that's the idea.

Point 4: NPCs have a built in awareness of how their local world is going.  The NPC knows its role in the town and the role of its "friends".  It has goals, etc. and built in knowledge of the surrounding towns because of trade.

IF (and it's a big "if"), I can find a way to translate this knowledge into non-stupid NPC dialog then we really do have a world where many of the normal RPG style quests can generate themselves.

...and if you do something like release a dragon, it will have a profound and real effect across a huge section of the world.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #7 on: July 07, 2012, 07:05:51 PM »

Amazing Picture-to-image work there. So I'm guessing the AI is going along smoothly? You should also put a Mine Worker so the blacksmith can make better tools for both the woodsman, and miner. If you ever play the latest Minecraft, you should get a mod called "Minecolony". It has basic AI, and is addicting in my view Smiley

There will of course be mines and ports and shipyards and fishing and gardens and farms and chicken coops and sheep pens (though mythruna doesn't have sheep but some similar animal)... etc..

I'm just in the early stages trying to work out the math and algorithms necessary to keep track of the whole world this way without requiring a room of computers. Smiley

How about Lamas insted of sheep XD
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #8 on: July 07, 2012, 08:16:53 PM »

How about Lamas insted of sheep XD

To the extent possible, I'm trying to come up with semi-unique animals for Mythruna... familiar but different.

It just so happens that I had already come up with an animal that was almost cow-sized but had a wool like coat.  Sort of a cross between a cow and a sheep, I guess.  When I started working out resource mappings, I was pretty happy with myself.  The fact that you can get milk, wool, beef, and leather out of the same animal makes the resource tree much simpler.  Smiley   Hmmm... if I could just make it have bacon, too....
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #9 on: July 07, 2012, 08:20:40 PM »

You can get milk from real sheep, just not very much...
But I like the idea of a sheepcowpig. Tongue
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #10 on: July 07, 2012, 08:44:54 PM »

You can get milk from real sheep, just not very much...
But I like the idea of a sheepcowpig. Tongue

Heheh.  I just try to make the world more interesting.

I still haven't found anything good to do with horses other than maybe giving them horns or tusks or something.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #11 on: July 07, 2012, 08:59:09 PM »

flyingsheepcowpig please
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #12 on: July 07, 2012, 09:08:54 PM »

flyingsheepcowpig please

Now you're being ridiculous.  LOL. Smiley
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #13 on: July 07, 2012, 11:27:32 PM »

fire breathing ice dragon sheep cow pig smurf :]
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
BigredRm
Donators
Sr. Member
***
Posts: 379


<-o Word up goes to that modern man o->


View Profile
« Reply #14 on: July 08, 2012, 09:41:08 AM »

You can get milk from real sheep, just not very much...
But I like the idea of a sheepcowpig. Tongue

Heheh.  I just try to make the world more interesting.

I still haven't found anything good to do with horses other than maybe giving them horns or tusks or something.
Who needs horses. I'm a chocobo type of guy.
Logged

Visit Iron Island @ 1708,702
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!