Search Unity

Ecosystem bassed design

Discussion in 'Game Design' started by Kiwasi, May 16, 2015.

  1. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    So I've been throwing around a concept in my head for a while, I'm still nowhere near the stage where I can build anything. But it came up in another thread, so I thought I'd share it and see if anybody has any ideas or thoughts. The concept probably fits best for an RPG, but could easily be any other type of game.

    The general idea is that every resource in the game would be finite. Conservation of mass would apply on everything. For example there would only be a finite amount of gold in the game. If you spent gold to pay a merchant, that merchant would in turn be able to buy crafting materials from another NPC, and eventually that money would come back to you in the form of a quest reward.

    Some resources would be generateable, like food, but these resources would also need to be consumed. Thus the total amount of food available in the game would remain about constant. If some catastrophic event (or rouge player) destroyed

    Another key idea of this system would be the simulation would run independent of the player. In the absence of the player the system would be stable. NPCs would figure out how to get what they wanted. If the player was nearby they might ask for help clearing out wolves. But if not they would ask another NPC or simply get on with the job themselves.

    There are all sorts of interesting implications of this system. NPC quests could be dynamic, generated based on the situation at hand. If applied to combat consumables like ammunition then you could have interesting battles based around supply chains as much as the actual front. Player actions could have a world effect. If you clear out a dungeon of orcs then goblins might move in. Killing wolves might create a plague of rats.

    Of course I have no illusions about the difficulty of building such a system. Its currently beyond my coding abilities. But the idea intrigues me. I'm curious what other people think.
     
    Tomnnn, Ryiah and GarBenjamin like this.
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    As i wrote in the other thread then planning is really interesting for something like this:
    http://aima.cs.berkeley.edu/2nd-ed/newchap11.pdf

    With planning you can make sure that when you pay a NPC some gold for item X, he will somehow make a successful plan to get the gold back into the games circulation, which is rather important. You can mix this up with some heuristics and a bit for randomness.
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Started reading it. First page has references to chapters 3, 10, 7, 5, 12 and 17. Going to take me some time to get my head around this topic.

    But it certainly sounds helpful, thanks for the reference.

    The general idea would be this would work the other way. He would make some plan to obtain food or materials or some other item he needs. And as a side effect the gold returns to circulation. That's how it works in my head anyway.
     
  4. Socrates

    Socrates

    Joined:
    Mar 29, 2011
    Posts:
    787
    Overall, I think it's an interesting idea as long as the actual flow of resources if fairly transparent to the player and the player can have some effect on it in order to move things toward where the player needs it to be.

    Two examples:
    • If a player is trying to get enough "gold" to buy their new McGuffin but there is not enough "gold" flowing in the economy, how can the player encourage that "gold" to flow from whatever NPC is hoarding it?
    • When a player either knows their going to need something ahead of time, like a supply of food for a trip, or finds that there just isn't enough of something being produced in the local economy, such as ammunition, how does the player go about convincing the NPCs to invest in production? What happens if the player then doesn't keep buying the goods at that level?
    As a direct example of the second one, in Port Royale 2 you needed trade ships but could not ask a shipyard to build them. You basically had to go out and attack enemy convoys and hope you could find the ships of the size you need to steal. The sequel to that game introduced the ability to order ships from the shipyard, though within limits as you had to wait for an opening in production and you had to might have to import things like timber and tar into the community to ensure the shipyard had enough raw materials to produce your order.

    Overall, that kind of thing can make the economy a much more interesting part of the game. If the player has the agency to change how things are going both intentionally, such as with orders, and unintentionally, such as stopping rowboat production by buying up all the sealing tar to make torches, there would be a system that would definitely take a long time to master.

    I'd play it. (Assuming it was done well, of course.)



    As a side note, as a designer I'd want to look at the possibility of getting "imports" from off camera when needed. This could help both with the balancing of needed supplies and to ensure that sections of the game didn't just stop because one raw material ran out.

    There were times/places in medieval Europe where much of the metal a local blacksmith had to work with was recycled metal. The local sources had all been used up and there wasn't enough money in it to make metal from far off sources worth bringing in. This could be an interesting challenge if the game were a kingdom simulator and you were a king with such worries. For a more RPG style game where the player cannot buy any more arrowheads unless they first go kill a few local farmers and melt down their tools ... well, a little less fun. :)
     
  5. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    I think it is a cool idea although I do wonder about the finite aspect.

    I can definitely see where you are going with it with resources basically moving around from person to person. And I really like the idea of giving the NPC goals beyond just handing out information, quests and rewards.

    The part I wonder about is if resources are finite then ultimately won't there be nothing due to consumption and wear and tear? Food will be consumed and perhaps even "go bad". Items can break and otherwise deteriorate through use or simply the passing of time. I guess one could break down such items to regain the base materials that are still in good condition. Or do you plan on simply making it so things don't deteriorate in any way?

    If all local ore mines are depleted and mines in other towns could transfer the ore that would be one way to solve the problem.
     
  6. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Not totally sure where you're going with this, but at the same time I've probably had a similar idea. This would have been before Skyrim, so it was in relation to either Oblivion or Mount & Blade (possibly both), but the idea was for a sort of fractaled economic system. It would all come down to stocks and flows that could all be subtly balanced and manipulated in the background.

    Lets say the player wipes out an NPC's food stock (just ransacks the place), the NPC would take a hit to their gold stock, but their food flow would be fine as they get more food from the city's stocks. Now lets say all of the houses had their food stores vanish. The city's food stocks would filter down, but if the city's own food flows weren't adding to the stocks the price would rise on the larger market. The 'global' market could then have all sorts of agents going around and trading between city's (nodes).

    The main idea was to look at it as tiers. Each tier is more or less just the average of the stocks and flows below it. This way it should be easy to have large, but simple market forces to play around with.
     
  7. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    Okay as you point out by the law conservation of matter and energy mass is sort of conserved but if I burn wood it does change form i.e. now I have ashes, but the energy is still in the ecosystem in some other form however,I can't build a boat out of the remaining ashes. Besides, with the possible exception of the micro-managed acgriculture in Papua New Guinea, there is no stable system on the planet. Probably better to have a random set of FSMs i.e. if there is a random check in the game and suddenly there is a forest fire then activate a forest fire FSM which feeds effects into the game and throws switches to set a variety of events and possible quests. One could then add to these events through patches as time goes on thereby enriching the game world. This means instead of having to develop a large complex system you just deal with small seperate components, unless of course your intention is to create some kind of simulation game.
    These sort of FSM components one could do almost anything with. Say one of the characters has a particularly successful adventure and brings back loads of gold - this could active the 'loadsamoney' FSM which might in turn activate 'charlieThegangBossIwantthatgold' FSM and also 'thatBloodySwineJustDevaluedTheCurrency' FSM and so fortth. That means you could start small and grow the system slowly when you get time.
     
  8. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    My general feeling on this sort of thing is that it could all be managed by supply and demand. If nobody is paying for an item or service, then it will become cheaper. The ship wright has to eat at some point. Same thing with buying supplies for a big event. Pay enough, and the production should shift to match needs.

    This sort of high level economy management is going to be pretty intense. I'm probably going to start off with a much simpler economy. Perhaps a bunch of woodland animals, with relatively simple goals and tasks. I did build a limited resource system with a couple of amoebas.

    Yeah, I may not have explained this properly in the OP. Some resources will be finite, like gold or metal. These resources will not deteriorate or break down in any way. Sure your +17 broadsword might get damaged and turn into 17 kilos of scrap iron. But a village blacksmith could convert that into a plough for the local farmer.

    In terms of consumables my idea was to have resources that can be produced, but must be consumed. Food would fall into this category. You could produce it, but you must also consume it. At some point the system would balance with the amount of food being produced matching the amount of food being consumed. And thus the total amount of food would be stable.

    I like this idea. The amoeba system had a single tier. It used a simple diffusion model to move resources around (Ultimately I'm still a chemical engineer at heart). But I'm thinking that in order to build this on a large scale tiers sound like a good idea. Keeping track of every single item in a game is probably impossible. But keeping track of resources, connections and flows at a city, region, country level is probably very doable.

    The general idea is to try and make a game inside and within a simulation, rather then to build a simulation just to serve the needs of the player. In my head it has some marvellous capacities for emergent game play. In general I do like my simulations, I never did make the amoeba system actually playable.
     
    Ryiah and GarBenjamin like this.
  9. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Let me know when your capitalism simulator has it's own 1% problems, haha :D

    It'd be cool if the game world simulated a passage of time when ever the game wasn't running. Maybe you go on a family vacation and return to see the town overrun by wolves with bits and pieces of villagers strewn about the city.

    You could write a text based simulation of the market at work and see how it would work out. Once you have a stable economy, transplant the code into unity :D
     
    Kiwasi likes this.
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    I think you should stop reading my mind and stay away from my survival simulation game I'm planning :p

    In other words, this is something I've had in mind for several months now. Fishermen fish and sell those fish at the market or general store, same for farmers. They make money from that, which they can use to buy personal goods or services. People providing those other goods or services (like say, a doctor that keeps a health stat maxed or a lumberjack/construction worker who builds for a fisherman or farmer) make money which they use to buy food and other things.

    And there are even cooler things you can do with that, but I'll save them :)

    The thing is, it seems like it will be incredibly, incredibly CPU intensive (not only that but a couple other things I have in mind). You're simulating an entire world, not just the player with a static world. And of course making it stable might be a nightmare.

    Who says they need to be able to? This is a simulation, remember. As long as there's player agency in other areas (like thievery, or taking a job), there doesn't necessarily have to be an artificial mechanism for helping the player.

    This is something I've thought about as well. You could do it with a plane--with convincing security the player cannot get on it and it just goes out of sight. Or a train perhaps, in older times.
     
    Last edited: May 16, 2015
  11. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    This is very very true. Often you will play around with genetic algorithms and neural networks if you want "true" simulations, because agents needs to learn and evolve. Problem is that for them to be effective you often need HOURS/DAYS of offline learning in order for the most simple problems to be solved.

    Would probably need a server farm to train stuff behind the curtains and then send results to the game world. Of cause you could train them online but there would likely be a lot of noticeable quirks around.

    You can fake a lot of it with stuff like planning. But the game is then limited in the option space you create, hence quite limiting.

    Think this is why these type of simulation games don't exists really. It will be costly.
    Also the most cutting edge AI algorithms still fail in many regards.
     
    Last edited: May 16, 2015
    EternalAmbiguity likes this.
  12. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This I why I haven't built it successfully yet. Bit I've got it in my head that the right application of calculus, mass balances, diffusion models, pinch analysis and layering could make it work. I just haven't had the right 'aha' moment to tie everything together.

    I built a semi stable simulation with self replicating microbes. Each microbe used a different resource, and the resources basically shifted through the system on an endless cycle. Unfortunately this was before I learned the value of decent backups and source control. This blog post is all that's left of the simulation.

    To be honest I'm more interested in building the simulation and making it stable. So far letting players in has just got in the way. :)
     
    Ryiah and EternalAmbiguity like this.
  13. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    You can interpolate unloaded NPC actions. If the player is off in the woods doing who knows what, don't simulate the town in real time. What would be cool is if you could coordinate a schedule of actions and how long each should take, so if a user leaves a chunk for 20 minutes and comes back, the town jumps ahead 20 minutes. So if the fisherman is queued to spend 12 minutes fishing, 2 minutes traveling to the market, 4 minutes selling at the market and then 2 minutes to walk back, it would perform those actions instantly when the player returned and he would appear at his dock performing his fishing task.

    stop trying so hard and just fake it like everyone else :p
     
    Kiwasi likes this.
  14. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Don't get me wrong, it will totally be faked. Just in the way a chemical engineer would fake things. Cause that's what I am at the moment.
     
    Tomnnn likes this.
  15. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    The problem with this is that it doesn't allow (as much) for a dynamic world. A thug NPC can't ambush a fisherman walking alone on a road, which causes there to be less fish sold, which causes the total food amount to decrease, which causes NPCs with low hunger stats to either go out and get food themselves or steal from someone, and if they steal from someone out of desperation they may be caught by the sheriff, and if they kill the sheriff then the thugs run unchecked and start harassing everyone--

    Well. What was I saying? Very, very, VERY complex :p
     
  16. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    When you get the 'aha' moment, then PLEASE write a paper about it and publish it! :D
     
  17. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I think it can. It's possible to describe these sorts of interactions at a macro level without delving down to the micro level. Knowing the number of bandits in an area and the number of shipments being made, one could calculate the amount of shipments that make it, and hence the price of fish. This could be done without having to simulate every single encounter between a bandit and fish shipper.

    Then as the player gets closer the simulation collapses down to more details. Individual shipments and bandits pop into existence and players can influence events.

    The same way we can define rules define ridgidbody physics or fluid flow in a pipe, without simulating every individual particle.
     
  18. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Will do. At least a blog post. Unfortunately this is far from my full time job, so don't expect it soon.
     
  19. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    At a macro level, certainly. I'll be honest though I'm thinking about my system, which involves the player being in that world and experiencing some of those effects.
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,692
    @JoeStrout started a discussion about ecosystems a couple months ago. A few of us cited Ultima Online, which initially implemented this and then removed it when they couldn't keep the ecosystem balanced. Seems like there are at least three design challenges that could be tackled separately:

    1. Keeping the ecosystem active but balanced,

    2. Generating relevant quests,

    3. Making it fun and understandable to the player.

    #3 might not be an issue. Some players might get frustrated when things change and they don't understand why, but others will enjoy exploring and tinkering to find out what changed in the world. If the experience is geared toward tinkerers, no problem.

    Are you thinking single-player or multiplayer? You could let a single-player world go to pieces if the player chose to drive it that way. On multiplayer, you could run the simulation on server(s) without impacting the client's framerate. But multiple players would make it harder to keep the system balanced.

    Also, Tradesys might provide some ideas for managing supply and demand. I have no association with this product other than starting to look into writing a support package for Love/Hate so traders can adjust their prices based on relationships.
     
  21. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Thanks @TonyLi. I'll definitely check out Tradesys and the other thread.

    At the moment I'm thinking single player. This is more because I like single player games rather then multi player games.

    That said there is no reason why you couldn't apply the concept to a persistent multi player environment. You would need something to deal with players inventories. Players being able to hold on to items when logging out would ultimately lead to deflation, as some items would be removed from circulation forever. You would encounter the same issue with inflation if you gave new players a starting kit. There are also issues around the economy size. A finite amount of resources becomes a challenge when your player base shrinks and grows.

    Keeping the eco system active and balanced is a challenge. I'd essentially be borrowing a lot of principles form biology to make the system self regulating. The amoeba project showed there is certainly a lot of fine tuning that needs to happen to make it work. But I did end up with self regulating stable systems.

    This is where I am simply going to download your solution from the asset store. :). I will provide the wolves and the farmers, your system will turn that into player quests.

    The other option might be to drop the quest model altogether. Quests are helpful in providing the player with a set of "if you do this, then this will happen" type teaching moments. But I'm not altogether sure that they are needed for a successful game.

    And of course there is no reason why this sort of system can't be run in parallel with a hand crafted large quest system, like "Defeat the undead horde".

    Yeah. I'm probably going to be shooting more for civ players over cs players. Or whatever the modern equivalent is these days, its been a while since I kept up with the latest trends.
     
    TonyLi likes this.
  22. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,692
    Good point! I hadn't even considered the effects of player population.

    The multiplayer challenge would be maintaining the stability in the face of griefers.

    That's another good option. Open world single-player games like Skyrim have plenty of hand-crafted quests, and players do them to give the game some narrative structure. But I'd wager that's just a fraction of the hours that players put into Skyrim. They spend the bulk of their time on their own unofficial quests, such as filling their house to the roof with wheels of cheese. :)
     
    Ryiah likes this.
  23. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Just a quick note to say that is exactly what happens in my current main game project over there in my Avatar. While it does not look like much graphically speaking (intentionally with ultra low res small fixed palette) the focus is on AI and interaction and also includes a persistence system. Basically the game world is divided into a number of small scrolling areas. When the player leaves an area the local objects (enemies and such) have their states saved. Each record includes a timestamp. When the player returns to an area the amount of time passed is taken into account and the local world updates accordingly. It is all very fast because all that is needed is for their code to be executed to simulate the passing time. Their first actual display graphically will be that final state that represents the the amount of time that has passed.
     
    Kiwasi and Tomnnn like this.
  24. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Maybe dormant NPCs can 'tick' then instead of jumping to the next task. Every however often, unloaded NPCs tick to update their current activity and maybe trigger such an event.

    Fisherman fish tick 1.
    Fisherman fish tick 2.
    Fisherman walk to market tick 1.
    Fisherman walk to market tick 2.
    Random NPC mugs fisherman.
    Fisherman sells +40 food to the market which has 50 hunger.
    Randomly selected NPCs begin a sequence of ticks towards scavenging.

    I'm a little screwed for time now that school is done with, but maybe next weekend I'll try putting a small system together like this. No background, no solid ideas, just jump in and implement and then give the source exclusively to @BoredMormon if there's a successful result.
     
    Ryiah, GarBenjamin and Kiwasi like this.
  25. ensiferum888

    ensiferum888

    Joined:
    May 11, 2013
    Posts:
    317
    I'm really interested in this as this what I'm trying to achieve in my game as well. I've got the "quests" worked out quite nicely so far but the economic ecosystem is where I'm stuck at right now. At first I really tried to start with a finite money pool and have the system kind of balance itself but my lack of knowledge in economy has gotten the best of me.

    I resorted to have every house owner make a certain amount of money every season, the higher your social rank the more money you make. That's not counting business you might own or other means of acquiring money, the NPCs are playing the same game you are, you just happen to be the top of the food chain. With that money they can pay for repairs on their houses, pay their taxes etc. That money comes to you and is then distributed to your own workforce salary.

    I'll be following this thread as I'm interested to see what you come up with for your economic system. We're not making the same kind of game but I think we could apply more or less the same global system behind it.

    You're making a game where you play as a lone person wandering a complex ecosystem, I'm making one where you play the lord of a city in that complex ecosystem.
    -----------------------------------------------------------

    How you you handle finite but renewable resources in a system like this? For example wood which is the most common building material. You have wood cutters providing you with the resource, people can plant them back. Say a great fire destroys half a town, wood demand will go up. But if there happens to be a gigantic forest half a mile out chances are people won't be buying the wood they'll just harvest it.

    Would that ecosystem be a central pillar in your project or just something in the background that most people probably wouldn't even notice?
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,692
    @BoredMormon - Those images are interesting. Why not build the simulation then, perhaps simulating microbial colonies (or a similar abstraction) instead of simulating a fantasy RPG world? I think it would be fun to tinker in a god-game world like this. Once microbes are working well, you could experiment with, say, competing ant colonies, and up from there.
     
    GarBenjamin and Socrates like this.
  27. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I knew I shouldn't have talked about this on here! You guys have got me all excited about the concept again. Spent the evening messing with a prototype instead of the promised updates to Pond Wars (sorry @BudgieKnight, you are just going to have to wait for machine guns).

    The prototype is pretty dirty, its more focused on "can this system make a fun game" instead of "can I build this system on a massive scale". So sorry @BFGames nothing paper worthy is going to come out of this one.

    I've built a single model with 4 resources.
    • Gold (finite)
    • Food (generated and consumed)
    • Water (generated and consumed)
    • Wood (generated and consumed)
    The system will have two types of agents
    • Cities that generate and consume resources
    • Traders that move resources between cities
    • Bandits that prey on traders
    So far I have built a set of cities that both harvest and consume resources. The cities grow and shrink on a logistical model, based on the limiting resource. Resource consumption/generation is scaled linearly base on population. The scales are fudged to simulate local resources. Each city has a market that sets a price for the goods based on the abundance of the goods in the city.

    The next stage is to build the traders. Traders will be able to transport a single good from one city to the next city. At the beginning of each journey the trader will use a greedy algorithm to choose the resources to buy and the city to take them too. At the end of their journey they will sell all of their resources and start over again.

    If that all works, and I can make it stable, I'll add in bandits. I haven't figured out exactly how the bandits will work. More on that later.

    And finally I should actually let the player participate. Not sure how that will work either. Pesky players, always complicating things by demanding to be able to play the game.
     
    Socrates, Ryiah, TonyLi and 1 other person like this.
  28. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    If I'm going to build something this complex it will have to be central. I'm not an AAA studio to be able to afford huge amounts of time on 'ambience'

    One of the key principles for renewable resources I'm working with is that every resource that can be generated must be consumed. Food is a common example of that. For your specific case you can control wood demand by differentiating skill sets. Say only wood cutters can collect wood. Only builders can build structures. There is an economy of sorts. Thinking about it Stronghold is a decent example of a game that produces an economy by forcing specialisation. But it doesn't do the finite bit on anything.

    Shouldn't you be looking for a job or something? :). Not that I'm going to say no to seeing anything you build. Thanks

    One of my weaknesses is that I don't like to do the same thing twice. In my head I've already done microbes, so I can't do them again. But the idea of simulating a small abstract world is good. Pretty much what I'm going to go for on my trader simulation.
     
    GarBenjamin likes this.
  29. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Pff, no. That's now how the world works. What I need to do is be extraordinarily kind to my family and friends and be handed a job through recommendation & knowing people. And I did that around midnight last night. A friend who is leaving a company needs a replacement because the company is small. That's 1 offer. My cousin says her company is hiring new software engineers. That's another offer.

    I really hope my cousin can help with that one. That job actually matches my degree and then I don't have to continue to commute through Newark.

    Everything is scheduled to take place this weekend regarding the simulation. All that's left is deciding whether I do it in java, C# or javascript.

    javascript is only there in case you don't trust me to send you an executable file :D Maybe you, the sort-of-client should decide?

    Java & C# will look identical. A console application that just logs a ton of text and logs the events of each day.
    Javascript would have some buttons and things just because making that in web is easy. No flowing rivers of text, just json objects annoying each other behind the scenes and sets of numeric values being changed as they interact.

    The schedule is...

    Friday - make a single entity that obtains resources from its environment
    Saturday - make a second entity and code interactions between them
    Sunday - run the simulation for a month of simulated time for populations of size 2, 3, 4, 10, 25, 50, 100, 1000
     
  30. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Have you solved the player-swarm problem? This happens when many players reach content at the same time such as with release day, peak play times, or an area becomes popular. Yes, it's true that scarcity of resources might auto-correct the system given enough time. And the cost is that many players will have a bad experience. Technically, I suppose players quitting is a self-correcting mechanism too. Players are the scarcest resource.

    Gigi
     
    Tomnnn likes this.
  31. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    @Gigiwoo full on capitalism obviously does not work. If value is based off of finite goods, the game is either going to be super wealthy with a small player base or extremely poor with a large player base. Gonna have to shoehorn in some thats-not-how-it-works magic.

    More players on the server => more CO2 in the air => more CO2 for vegetation => more food for animals to support larger populations => more animals to die and become carbon to be compressed into coal and diamonds

    There are also meteors that can bring new materials from far away :D
     
    Gigiwoo likes this.
  32. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Currently I'm ignoring it by making the game single player.

    I have had some thoughts in the past for it. Basically making the world large enough and starting players in diverse locations. Player inventories would also be represented in real world location to stop deflation when players lo off and don't log back in.

    But this still doesn't deal with the problem of sharing finite resources amongst an expanding player base.
     
  33. Sylvir

    Sylvir

    Joined:
    Mar 21, 2015
    Posts:
    396
    I think that it is a really interesting idea. One that could be great, or fall completely flat. I feel like it all depends on the way it is set up. It would be one that could really honestly be different each time you step into the world. If you choose to spend the gold on other things, or even just hoard it all to yourself then the wealth of those around you would be different and far less resources would be available. Maybe if you decided to play that way you make more enemy and those around you could make a plan to steal from you, or even attempt your assignation. It would defiantly be a project that I would be interested in hearing more about as your idea came along.

    """But this still doesn't deal with the problem of sharing finite resources amongst an expanding player base.""""


    you could make something to the effect of.. every new "real person that creates an account or character" adds x amount of each resource to the game world. That way as more people start to play it the resources will be driven up a little as well. Might help balance that out a bit. How many resource types were you considering for this
     
  34. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    In the real world, maybe not. But in your game, maybe the lessening wolf population allows other species to dominate... and then suddenly there's a population explosion of rodents that eat bugs and poop gold.
     
    Gigiwoo and Kiwasi like this.
  35. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Thought about something like this. It gets complicated when you try and reverse it. Each time a player leaves resources are eliminated? From where? It could still upset the balance pretty dramatically.

    All of them. Tangible stuff like gold, metal, weapons. Consumables like food and potions. Even the monsters themselves.

    Something like this might work.
     
  36. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    @BoredMormon Also don't forget me. Entertainment creates value, so a local jester could drum up a bit of business, spend money on other goods, and eventually that wealth can be traded with 'foreign traders' who occasionally pass through the village for resources that were recently scarce.

    Instead of a hard limit on how many resources can be generated in an area, maybe you can have a hard cap on how much of that material can exist in its raw state. So if stupid player A wants to build a castle of pure iron that would take twice the amount of resources available, s/he doesn't deplete the entire world of iron forever lol.

    Here's the tragic cycle for you:

    -Miners dig a tunnel and find iron deposits
    -Miners mine the iron
    -The iron provides say 100 units before depleting
    -The iron is made into other things, removing all of the raw iron in the game
    -A meteor strikes the tunnel, killing / injuring anyone nearby and depositing more iron into the same site
    -Local doctors treat the injured
    -A new set of miners go re-dig the tunnel, repeating the whole "iron cycle"

    So I'm essentially suggesting a water cycle, but for more than just water :D If we were to just bottle the water and store it, we'd eventually run out... but by using the water, it returns to nature, gets filtered through the ground, rains back into the ocean, etc etc.
     
    Gigiwoo likes this.
  37. Sylvir

    Sylvir

    Joined:
    Mar 21, 2015
    Posts:
    396
    how would you calculate when a player "leaves" though? when they are inactive for a certain period of time?
     
  38. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Maybe the solution to resources tied to players is in thieves and traveling philanthropists. Player logs on and a traveling philanthropist shows up sometime thereafter. Player logs off and thieves hit. Ultimately, if big enough players would be logging on and off often enough you may need to do nothing or very little at all. In the beginning with few players would be most noticeable probably. Maybe the check for balancing occurs once every 10 minutes. If needed wagon rolls in to invest in town/game world or if needed band of thieves come in and steal some stuff a bit here a bit there.

    I suppose you could go by reality. There really is only so much but it is a vast amount of raw materials but processed items are what is really in danger of being bought out and horded.
     
  39. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Player logs in. Player murders everyone and obtains all wealth available in the game. Player leaves game forever.

    What do
     
    Kiwasi and GarBenjamin like this.
  40. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    If they are capable of obtaining all wealth in the game world then so be it. Game Over. It should be impossible for someone to do that (ALL).
     
  41. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,141
    Some games have a periodical reset.
     
  42. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I live in America and that's pretty much the future lol

    Maybe if the population is wiped out the next sentient species can arise. If all humans are wiped out, dolphins will be the next set of NPCs the player can interact with.
     
    Kiwasi and GarBenjamin like this.
  43. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Quick update on the prototype. The first system failed abjectly. The greedy algorithm for trade causes all of the wealth to end up in the hands of wealthy merchant traders. Lack of wealth in the individual cities stymies trade. This causes growth rates to plummet and world population to shrink down to subsistence levels. Time for some more rework on the system.

    Please note this is a comment on my game simulation, and no way related to political and economic events of the past few years. ;)
     
    GarBenjamin likes this.
  44. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Sounds like a classic example of why realism in games is not a good idea.
     
    Kiwasi likes this.
  45. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Just one failed prototype. Not quite willing to give up yet. It does give a good example of why no one has done it yet. Self regulating systems seem more difficult to design then I first thought. I might just end up adding in a bunch of PID control.
     
  46. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,141
    How long did it take for the simulation to break down?
     
  47. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    The greater question to ask: was it a failure from being inaccurate or is it flying too close to the sun?

    If you're still working on this in a few months/years, twenty bucks says you'll change your views on capitalism (including, but not limited to, becoming paranoid about banking conspiracies, protesting against the Fed, and/or joining an anarchist commune).
     
  48. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    You can try having the traders be nameless, faceless entities? Have a trading post instead of a trader so goods go in, goods go out and you can't explain that.

    Yes, I said it.

    @RockoDyne any true simulation of capitalism will end up with its own 1% problem like we see in america today. I wonder if there is more money / cash than there is equal value. Could the 1% group together and buy literally everything?

    @BoredMormon I know it will be less accurate, but I think I'm gonna hardcode out the chance for a single entity to buy all of the food causing everyone else to starve.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,692
    Taxes!
     
  50. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    That might take money away from the rich (hopefully a large percentage of what they have if they have most of it), but then it just ends up in government hands. The government can pay for public services... but a lot of ordinary citizens will still have nothing.

    Unless the game premise is that everyone is employed and paid by the government, which happens to not be corrupt.