Experilous

Having decided to declare my latest project a prototype, and further to declare that it has outlived its usefulness (see my prior post), it’s time for a prototype retrospective.

As I described in my previous post, I failed to outline ahead of time the questions that the prototype would seek to answer, so it’s hard to say whether the prototype achieved its goals.  But I can at least go back and infer what those questions might have been, given the answers I have acquired. 

Questions Answered

In the order that I recall them (recency and significance thus taking priority):

Question #1:  Can I utilize the economic simulation model designed by Jonathon Doran and described by Lars Doucet for all economic activity in my city simulator?

Answer:  Nope, it doesn’t seem feasible.  The core model is completely oblivious to buyer/seller locations and travel costs, and I’m pretty sure that without locational awareness, this model would would flatten the economy of the city.  Neighborhoods would have no economic distinction from each other, and traffic patterns would not be strongly or believably impacted by economic patterns.  I may still be able to utilize the model for some resources, or for different levels of economic simulation, but I cannot come up with an efficient way to integrate travel costs into the double auction component of the economic model, since travel costs are highly relative to the specific buyer/seller pair, and cannot simply be calculated per buyer or per seller independently.  Even when attempting to simply estimate travel costs per buyer or per seller, I ran into serious problems.  One of the more notable ones involved one-way streets, and I absolutely do not want to give up one-way streets in order to make a particular economy model function efficiently; I’d rather find a new economy model.

Lars did outline some ideas for integrating multiple markets with travel costs getting involved for traveling merchants.  It’s not immediately clear if I could take advantage of these ideas, but I’ll continue to revisit this subject in the future.  Maybe something will click in my brain next time I attempt to tackle the problem.

Question #2:  What resources should the player manage directly?

Answer:  Money, nothing else.  I initially started with the full set of resources being directly available to the player.  Since this was a very early prototype, I was keeping it simple, so it started off only as money and an arbitrary physical commodity (I called it coal).  Land ownership also had a fuzzy involvement, though it was never visibly presented to the player.  Ultimately I decided that this would get out of hand fast.  I also do not want this to become a resource management game, as that will naturally encourage minimaxing strategies, something I’d rather not encourage for this particular game.  It’s core appeal should be creativity and the production of material for player-generated stories.

Fortunately, I was able to devise a solution and test a simple implementation that involved a hidden game agent that served as a proxy between the player and the game world.  Sort of the city’s administrative body.  As far as the game simulation was concerned, this agent was just another participant in the economy.  It had price beliefs about various resources, had its own ownership of resources and land, and made its own trade requests like any other economic participant.  As far as the player would be concerned, this agent was the window through which the player would interact with the economy.  For any project the player was designing, the proxy agent would consult its own price beliefs about resources, and provide a monetary estimate of the project’s cost to the player.  The player could then approve the project, handing over the requisite money to the proxy agent.  The agent would in turn use the money to purchase all required resources to complete the project (such as building roads or city-owned buildings).  The agent could also transparently go into debt if it underestimated prices, and this debt would simply influence its future price beliefs and thus the price estimates that it would provide to the player, thereby keeping the agent’s average account value near zero.

This appeared to work well, and kept the details that the player needed to worry about to a minimum.  Interface elements could always be added so that if desired, a player could look at the details of the project costs, and the price estimates of various resources, trying to gauge the market.  (Maybe steel will drop in price in a few years once the new smelter goes into operation; might be wise to build the new bridge after this happens.)  But if a player just wants to jump in a start playing, having a single numerical value to worry about would be sufficient and welcome.

Question #3:  Can I get away with using just integers in my simulation code, avoiding the reproducibility issues with floating point numbers?

Answer:  Not quite.  Integers ended up having far too many rounding errors, making it a pain to work with them.  It was a chore always having to think about the various rounding strategies every time I did a division.  And in numerous cases I was making code particularly convoluted so that I could accumulate many values and just do my divisions at the end, in an attempt to reduce rounding errors.  For those situations where I still had loss of precision issues, the result was often simulation behavior that was hard to comprehend, leading to slow game balancing sessions.

I ultimately ended up quickly writing my own basic fixed point library, and usually just accepting the default round-toward-zero policy of integer division, since rounding errors should be insignificant on overall simulation behavior.  As long as the rounding error is absolutely consistent across all CPUs and OSes, and doesn’t interfere with the large-scale patterns of the simulation, I’m happy.  (I chose not to use an existing implementation because I couldn’t find one that worked with 64-bit values, since they require 128 bits in order to do precision-preserving multiplications and divisions.  For now, I’m instead living with precision loss for those operations.)

Question #4:  Can I use database normalization rules to help guide me in choosing my data layouts?

Answer:  NO!  Highly normalized data might be good when use of a flexible query language for unpredictable queries is valuable.  Simulation code is going to be highly controlled, however, and that means that I can and should strongly organize my data according to the ways in which I access and manipulate it.

I’m still uncertain how I’ll combine this approach with flexible modding capabilities.  I’ll need to keep an eye on this concern as I proceed, as I have a gut feeling that with the right design, proper flexibility can be maintained for modders, even if general flexibility is lost.  This may involve giving modders working on simulation-specific mods the control necessary to also choose their own data structures and access patterns, and would thus require a certain degree of technical proficiency from them, as well as a good explanation of the core simulation’s model.

Other Thoughts

In addition to Jesse Schell’s tip #1 that a prototype should answer a question, he provided some other tips in The Art of Game Design that I’d like to reflect upon.

Tip #7:  Pick a “Fast Loop” Game Engine.  I’m using C++, not currently using any game engine, and do not yet have any scripting language integration, nor do I yet know how I’d like to eventually utilize scripting.  As you can imagine, quick iteration times are a challenge.  But thanks to the article “Why YOU Should Embed a Web Server in Your Game Engine” by ApochPiQ on Gamedev.net, I was motivated to do just that, and the results are very promising.  Right now I only supported read-only integration for specific data, but it should be easy to integrate some write access directly into the game through the web API.  I expect this to have a radically positive effect on iteration times, especially when I get deeper into game balancing.

LEGO Suburb #1

LEGO Suburb #1

Tip #6:  It Doesn’t Have to be Digital.  Unless you count my use of a whiteboard during my attempts to design various simulation algorithms, I haven’t yet directly taken advantage of this tip for my city builder project.  But I did begin something of a side project with LEGO to exercise my creativity in building miniature cities.  I started with a small suburban environment, doing one house or other element each morning.  There’s no telling what miscellaneous inspirations that might provide going forward.

Tip #2:  Forget Quality.  I described in my prior post how I combined this latest prototype with some research and experimentation into Data Oriented Design, but how it might be useful to keep in mind that these two aspects are distinct (prototyping versus learning new technologies/skills).  Reflecting on that further, it might be useful to truly keep them separate.  Because I had iterated multiple times within my single prototype, trying to get the data layout figured out as best as I could, I developed a bit of attachment to the prototype.  But that violates Tip #3:  Don’t Get Attached.  Oops.  (I’m sure that wasn’t the only reason for developing the attachment, but it contributed.)  Perhaps in the future I should almost go out of my way to keep the quality low, since it’s much harder to become attached to something that you know has poor quality components.  As long as the prototype provides quality answers to the appropriate questions, all other quality can be dropped, and maybe even actively avoided.

Onward!

It’s time to push on with the next prototype.  This week I’ll be making sure that I understand precisely what questions this new prototype is intended to answer, and will be carefully considering what minimal amount of implementation will be necessary for providing those answers. I expect it will be at a much higher level, focusing not on simulation details, but on a much bigger picture of game play. It might not even be graphical. At all. Hopefully this will make the prototype process go much faster, and that can only be a good thing. Jesse Schell asserts as absolute truth “The Rule of the Loop: The more times you test and improve your design, the better your game will be.” Here’s to my efforts to iterate frequently and efficiently!

1,141 Comments

Comment by APSMS2014/04/22 @ 20:52

I was unaware that you had been making these blog posts on an infrequent basis. Nice progress so far, and along with Citybound this looks really promising in terms of the planning that has gone into the game so far. You should continue the posts on Simtropolis whenever possible; the interest may be encouraging, though of course I wouldn’t spend too much time there. That can be energy sapping as well.

Looking forward to where you go from here now that you have defined a few of your project goals more articulately.

Comment by counting2014/04/30 @ 20:24

Agent-based economic simulation is certainly feasible in academic capacity, its even an emerging field called ACE (Agent-based Computational Economics). Robert Axtell had claimed to simulate at 150 millions agents level years ago. Although in city simulation, firm level agents should be sufficient as economic entities (household, factory, stores as agents), and can greatly simplify the problem.

I think the key issue to integrate traffic with economy simulation is spacial scarcity. Travel cost should not be the direct “price determine factor”, but the operation cost of firms. Jonathon Doran’s model focus on RPG setting, has some inherent assumptions like inventory level maintain, which put in a city building perspective doesn’t make much sense. Few warehouses in a city can supply millions of people, with many firms and thousands products. In modern industrial production, we have economy of scale with vertical structure, rather than a medieval RPG flat structure.

The idea of indirect agent serve as the medium is quite suitable for agent-based concept. Hiding the complexity of resource management is probably a good idea too. But for my personal taste, I like to know more details rather than less. Like in Tropico game, I love the details even if they are mostly decoration. Think about how cool it would be when building an office building, a complete firm financial estimation chart shows up in the information window with details generated from simulated activities, who are the suppliers, etc. It doesn’t have to be min-max, but with different choices, you gain some and lose some.

Trackback by QQPoker2018/09/26 @ 13:51

just click the following page

Experilous: Prototype Retrospective #1: City Builder

Trackback by Poker992018/12/07 @ 19:04

click through the next article

Experilous: Prototype Retrospective #1: City Builder

Trackback by Poker2018/12/10 @ 21:38

click through the next site

Experilous: Prototype Retrospective #1: City Builder

Trackback by love back2019/06/06 @ 19:32

pickup 101 surefire Attraction secrets Review

Experilous: Prototype Retrospective #1: City Builder

Trackback by prom dresses kohls2019/07/25 @ 15:31

prom dresses kohls

download small baby girl with smiling face in blue dress outdoor stock image image ofbaby boy clothes hanging on ropeinfant boy shorts and t shirt drying on clothesline on old wooden background3d fish knit hat for toddlers sherpa beanies winter wearbab…

Trackback by chelsea home twin over full l shaped bunk bed reviews2019/07/25 @ 21:22

chelsea home twin over full l shaped bunk bed reviews

beautiful woman in big black glasses smiles and looks stock video footage storyblocks videoboost your style with mens fashion accessories fashion centralwenko bahari bamboo laundry bin 62210100buy chanel 4067 purple rimless women sunglasses 30881 at be…

Trackback by ballerine puma lacets chaussures chaussures et sacs2019/08/20 @ 07:44

ballerine puma lacets chaussures chaussures et sacs

acheter automne hiver enfants chaussures enfants chaussures dejolie robe enfant courte bleu pastel petite robe bleu avec ceinture fleuriedes ensembles b茅b茅 sold茅s famille en chantiersuper chlo茅 t shirt b茅b茅

Trackback by arma莽茫o aviador grau chilli beans prata bijouterias2019/08/20 @ 13:00

arma莽茫o aviador grau chilli beans prata bijouterias

black heathered cutout maternity sports bra2015 new sexy lace brasstretch non underwire pregnant women comfort seamless thin brassieres exercise vest sleep underwear in bras from underwearhot new 2pcs sexy lace lingerie set open bra thongs lenceria sus…

Trackback by mae womens lace bralette and panty set clothing2019/08/26 @ 18:44

mae womens lace bralette and panty set clothing

white backless lace mermaid wedding dresses short sleeve wedding gown bride dress robe de mariagecute summer beach outfitsjadore cheri gowncinq a sept womens burgundy printed sterling silk strapless maxi dress 4

Trackback by 涓彜 鏂板搧鍚屾 lv 銉偆銉淬偅銉堛兂 銉€銉熴偍銈般儵銉曘偅銉冦儓 銉°兂銈洪暦璨″竷2019/08/27 @ 00:57

涓彜 鏂板搧鍚屾 lv 銉偆銉淬偅銉堛兂 銉€銉熴偍銈般儵銉曘偅銉冦儓 銉°兂銈洪暦璨″竷

sand谩lia uza meia pata floral coloridosand谩lia anabela boneca conforto. carregando zoomblusa gola princesakqaoqao sapato feminino mulheres bombas stiletto casamento sapatos finos sapatos de salto alto mulher 2018 elegante

Trackback by http://adroitil.com/?p=5322&name=cat&name=Sholdit+Infinity+Scarf&mail=marenagarciniacambogia.directory&subjectForm=Welcome+To+Adroitil&subjectForm=06-28697147&messageForm=If&name=kleo.icati-youth.org&mail=Joao+Joaquim.Pires2019/09/01 @ 19:10

http://adroitil.com/?p=5322&name=cat&name=Sholdit+Infinity+Scarf&mail=marena%40garciniacambogia.directory&subjectForm=Welcome+To+Adroitil&subjectForm=06-28697147&messageForm=If&name=kleo.icati-youth.org&mail=Joao+Joaquim.Pires45%40luispedro.xyz…

Experilous: Prototype Retrospective #1: City Builder

Trackback by ted baker womens accessories ted baker womens accessories raisa hat2019/09/14 @ 09:50

ted baker womens accessories ted baker womens accessories raisa hat

賳氐丕卅丨 賱賱賳爻丕亍 丕賱賲賲 賱卅丕 賱丕禺 賷丕乇 兀噩賲賱 賮爻丕 賷賳 丕賱爻賴乇丞 賲噩賱丞 賴賷賵賮賾乇 賲噩賲賵毓丞 爻丕毓丕 賲丕賷賰賱 賰賵乇爻 賱賲賵爻賲 毓胤賱丕 2018 賱丿賶 毓丿丿 賲禺 丕乇 賲賳 噩丕乇 丕賱 噩夭卅丞 毓亘乇 丕賱毓丕賱賲 丕亘 丿丕亍丕賸 賲賳 爻亘 賲亘乇 2018賳賷賵 賱賵賰 賲丕賱賵賲丕 丨丿賷孬 丕賱爻賵卮賷賱 賲賷丿賷丕 亘丕賱氐賵乇丿賱賷賱 丕賱乇噩丕賱 賱丕禺 賷丕乇 賳爻賷賯 丕賱丨匕丕亍 丕賱賰丕噩賵丕賱 賲毓 丕賱賲賱丕…

Trackback by damen umh盲ngetasche nylon2019/09/16 @ 07:21

damen umh盲ngetasche nylon

funda samsung galaxy a5 2016 olixar armourdillo negracal莽a ciclismo feminino com bolso lateral e abertura com z铆per curtloestados unidos motorola moto g5 plus caja silverlos pioneros olvidados del pc que llegaron antes que steve jobs y

Trackback by cheap modest homecoming dresses2019/09/16 @ 14:53

cheap modest homecoming dresses

akg k702 studio headphones for big earsoptical wireless gaming mouse price free shipping gaming xboxbluetooth headphones wireless earbuds sportdrivehub for xbox one and

Trackback by flower valley high neck jacket blue velvet blouse2019/09/17 @ 13:04

flower valley high neck jacket blue velvet blouse

mega volume. wispy lashes yelp2pcs false eyelashes clip eyelash tweezers applicator eye lash aid forcep toolsardell eyelash natural 110 blackmedium black individual eyelashes. never used. box is depop

Leave a comment