26 April 2016

Determinism and Gaming

Determinism, or the belief that everything is calculable according to mathematics, is a prevailing viewpoint in modern Western humanist philosophy.  People like determinism because it is predictable.  It allows people to feel like they can control the universe.  This feeling of control makes them feel more confident of future outcomes and thus better able to deal with abstract circumstances.

Most games are deterministic, at least on some level.  Determinism in games implies that the use of pseudo-random number generators (PRNG) is minimal.  It means that when you attack the same problem with the same solution you will always get the same result.  This plays into players' expectations and behavior in that they will typically only move when they know they will win.  For some games this is a positive trait to breed into players, while in others it produces boredom and monotony.  In the case of an MMO, the inherent irrationality of players produces some randomness, regardless of whether the game itself is deterministic or not, so the need for non-determinism is less necessary.  For FATES, most of this game will be deterministic.  If you build a farm on a given planet multiple times, it will produce the same amount of food for a given employment and power level.  If you design a starship, it will cost the same amount of resources (excepting currency) to produce every single variant of that starship design.

However, determinism is boring.  It also doesn't allow us to experiment in the fields of artificial intelligence and statistical system control, and part of the reason for the existence of our company is to allow us to provide funds for our team to improve their knowledge of every area that interests them.  So, in FATES, there will be a number of non-deterministic pieces.  For alpha, there will be no non-deterministic features, because that makes debugging significantly harder, and we want to produce a bug-free game for trustworthy alpha testing.  However, by the beta phases, we will be introducing a non-deterministic engine into the combat mechanics.  This is the 'black swan' event generator that I described in the combat mechanics post earlier.  This event generator will fundamentally rely on a pseudo-random number generator with a low-probability, high-impact outcome to randomly modify the combat losses on both side to redetermine the outcome.  This will add some non-determinism to the game, and make it more interesting.

For now, the combat mechanic event generator is the only planned non-deterministic feature.  I expect that the markets and diplomacy will exhibit non-deterministic behavior simply because people and their choices are deeply involved, but these will not be possessed of non-deterministic design.

Hopefully, this improves your understanding of the role of fundamental philosophy in game design and allows you more insight into our design decisions going forward.

Until next time.

á na márië,
gumshoe, out.

19 April 2016

Where We Are Now: April 2016 Edition

Hey all.

Brief update on our progress lately. 

We are still plugging away at the alpha client and have had a couple of major architectural changes.  First, we migrated the server-side cache from ConcurrentHashMap to Redis.  That was the easy part.  Second, we migrated the chat system from a polling AJAX to WebSockets.  This has proved much more difficult and tricky, but after several weeks of work should be done.

So our Alpha 1 feature list is looking like:

Alpha 1 mechanics:
  •     Stars and galaxy - DONE
  •     Planets - MOSTLY DONE
  •     Planetary cities - DONE
  •     Starship design - DONE
  •     Starship production - DONE
  •     Fleet creation - MOSTLY DONE
  •     Research tree - MOSTLY DONE
  •     Fiat currencies - DONE
  •     Sovereign debt market - BEING DESIGNED
  •     Galaxy chat - DONE
  •     Technology tree - IN PROGRESS
  •     Fleet travel between stars - MOSTLY DONE
  •     Fog of war - DONE
We are planning on Kickstarter video shoot for sometime in June, then a few weeks of editing and we should be ready to alpha testing and Kickstarter goodness.

Fun times!

á na márië,
gumshoe, out.

12 April 2016

Culture, Sway, and Discord

The economics of FATES has already been addressed, but I wanted to address in more detail the non-combat mechanics for changing planetary ownership.  The three primary factors in determining civic planetary ownership are culture, sway, and discord.
Culture, in FATES, is an abstract representation for the racial properties of a given player's populace.  Racial properties such as individualistic, industriousness, taxonomy, and subterranean dictate what types of planets that player empires can colonise and how their populace grow and develop.  Since the culture is both a physical and abstract property, players will have the option of eventually ending up with mixed culture empires, or they can maintain the cultural purity of their own racial archetype.  Each option will present opportunities and challenges.  If the player pursues a multicultural strategy, they will suffer from increased discord on planets not in line with the dominant culture in the empire due to sheer cultural differences.  However, one also gains the benefits of additional culture's positive and negative attributes at those same planets.  Player's who retain cultural purity will have much less discord to deal with due to uniformity of thought and action, but they also lose access to any of the traits from foreign cultures.  As a physical property, players will also be able to trade planets or colony ships with your particular culture to other players in order to allow them to colonise non-optimal planet types in their region of space.

The discord factor, mentioned briefly before, is a key game mechanic that allows planets to change allegiance between various player empires in the game.  Discord is a measurement of a planetary population's unhappiness with the current regime.  The discord exists to enable non-military options for transferring planetary ownership in lieu of raw military invasion and takeover.  The discord is tracked as a whole number ranging from zero to one hundred.  The discord matters most significantly when it exceeds 80, since that is when a planet will officially begin a revolt to divorce itself from the present owner.  When the discord on a given planet reaches 90, the planet will swap allegiance to the next highest sway player empire and significantly reduce the discord to give that player a chance to stabilize the political situation on their newly acquired planet.  The factors that get fed into the discord number include things like taxation rate, food rations, proximity to allied and friendly planets, presence of allied or friendly troops or fleets, presence of allied or friendly counter-intelligence officers, presence of subversion agents, sway divergences, economic prosperity, unemployment, and military conflicts taking place near or at the planet.  All of these factors will play into a planet's discord and thus into the ability of enemies to flip planets' allegiances.  The discord will also play into tax compliance, with the tax compliance decreasing as the discord exceeds 40.

The prime determining factor when a planet changes allegiance due to revolt is sway.  The sway is a measure of the relative cultural and political influence of a given player empire on a given planet.  The sway exists to incentivise territoriality by increasing the difficulty of maintaining far flung colonies away from a player's main territory.  The sway is calculated at every point in space and radiates out from each planet that a player owns decreasing exponentially with distance.  The sway values for each planet will overlap creating increased sway within a player's territory and making lone colonisation efforts difficult for enemies.  This should encourage player's to keep their territory as contiguous as possible and prevent enemies from dropping hostile colonies into the middle of any given player or federation's territory.  The sway divergence, as a factor in the discord, will eventually cause such a lone planet to revolt and join the dominant empire of the area, unless it is supported by significant military forces to enforce law and order of the enemy empire.  One of the properties of a federation, with regard to sway, is collectivised sway values that operate at a multiplier for all federation members.  The amplified federation sway will help to maintain order within a federation and disincentivise players, especially key members, from leaving a federation.  If a player is deep within a federation's territory and leaves the federation, their planets on the borders will suffer from increased discord, potentially revolting from them and joining the nearest federation member.

All of these factors should allow the non-military player to wield leverage over militaristic players, and help them to compete on par with the military play style paradigm players.

á na márië,
gumshoe, out

5 April 2016

Play Style Paradigms

As with all 4x games, FATES: Carpe Moerae will support the orthodox military strategy of domination by raw force, however I want to address in more detail some of the other play style paradigms that FATES: Carpe Moerae will be designed to support.  In many 4x games , the non-military paradigms are often papered over and released with little strategic depth, and this is an area where FATES: Carpe Moerae is being designed to shine.

The first paradigm that FATES will be designed to support is the economic powerhouse player.
This empire will be the financier of the galaxy and will be first and foremost marked by excellent management of their fiat currency to be the most valuable fiat currency in the galaxy.  A single unit of this player's currency will buy hundreds to thousands of other player's money, allowing them to finance wars and buy and sell favors for pennies on the dollar.  This paradigm will also be marked by extensive trading of resources and other player's sovereign bonds in order to create and retain leverage over every other major power player in the galaxy.  The support of this player will mean a sure path to victory for their allies or minions and ample resources for waging galaxy spanning wars.  However, following a purely economic power broker paradigm will force reliance on others for raw security where economic leverage alone fails.  This paradigm will be well integrated into the galactic system, possessed of immense resource storage and shipping capacity, and well-ingrained into the political wrangling in the galaxy.  These players will be the Rothschild family of the galaxy, always in the backdrop pulling strings and financing allies and enemies alike to achieve their own or their federation's ends.

The next paradigm that FATES will be designed to support is the Mr. Universe player.
This paradigm will be marked by extensive intelligence capabilities allowing this player to be the closest thing to omniscience that will exist in the galaxy.  This player will know everything that goes on.  All of the backroom deals, troop deployments, fleet movements, dossiers on every governor, admiral, and player in the galaxy, and a myriad of other useful and salable information.  The juiciest bits and bytes of galactic gossip will be available for the right price.  However, this paradigm will go well beyond simply information.  Need an admiral assassinated just prior to a crucial battle?  A somnambulant public awoken to rebel against the newly minted tyrannical image?  Sabotaging that pesky hypergate ferrying your enemy's armadas to your front door?  The legion of agents at this player's disposal will make all of these actions possible to well-financed buyers.  The line between shadow and truth will be adroitly walked and yield profitable returns for elegant and silent solutions to pesky problems.  This player can either run completely independent of any federation, working for the highest bidder, or operate as the intelligence arm of a galaxy-spanning federation.

The third paradigm that FATES is being designed to support is the cultural power player.
This player will be focused on enhancing cultural influence in the galaxy by means of political sway with nearby star systems.  The culture player will be hallmarked by cultural relics and treasures that are the envy of the galaxy's civilized population.  When other empire's fail to meet their populace' expectation of leadership, this player is ready to fill the lives of those lost souls with cultural meaning and galactic significance.  The cultural power player will acquire new planets by leveraging the discord of nearby enemies and allies systems; and when secessionist movements arise, they are the next most significant influential empire and welcome the new people with open arms and competent political leadership.  The culture player will still need to focus on self defense, or rely on a federation for defense, but they will remain mostly neutral in nearby wars, seeking only to pickup the pieces left after conflicts.  This player can either be a solo pacifist, seeking only to make their own way in the galaxy or a member of a federation serving as a buffer zone to acquire malcontent enemy worlds that secede due to nearby federation conflicts.

The final play style paradigm that FATES will support is the technological player.
This style of play will revolve around copious numbers of research facilities and personnel.  The technological player will advance in the sciences quickly, creating new ways to leverage high technology solutions to social problems and galactic conflicts.  The technological player will seek to be years ahead of competition technically, both in civic and warfare technologies.  Presently, technology transfer is going to be limited, but the technology player will be able to trade away already produced advanced ships and planets for use by allies.  This will allow the technology player to maintain technical dominance and still supply advanced technology to friends, allies, and minions in order to maintain technical leverage to affect outcomes in their or their federation's favor.

In all likelihood though, players will not cleanly fall into one category or another but the paradigms that are described here are extreme cases that FATES is being designed to support.  Players will very likely employ a wide variety of paradigms with several more focused than others.  There have been other paradigms tossed around in various discussions, but these four are the primary ones that are clearly defined right now.

Hopefully, you can see yourself in one or more of these paradigms and think in relation to the others, as each of these paradigms will be necessary for a federation to succeed in FATES: Carpe Moerae.

Until next time.

á na márië,
gumshoe, out

29 March 2016

Session Caching: Now Powered by Jedis!

So, recently, I changed over the backend session cache from a server-specific Java ConcurrentHashMap implementation to a Redis cache.  

Our session caching system is now powered by Jedis!
But seriously, Jedis is the Java implementation (one of several) of the access client to the Redis cache.  

The Redis cache itself is an impressively small -- only 13Mb of RAM running the server on Windows 7 -- and stores keys as hashed strings to save space for people who don't already hash their cache keys.  I am storing the sessions as JSON strings using Google's Gson to serialize and deserialize the JSON to and from my custom session objects.  The memory usage of the Redis compared to the ConcurrentHashMap that I was using are similar, but I gain the ability to access Redis from other servers in the same VPN as my other backend servers, so I can skip my clever passing of encrypted sessions via HTTP parameters.

The Jedis client itself is fairly compact and straightforward to use for the most part.  The only slightly complicated piece is the pooling, but it operates on the Apache Commons Pool 2 library, so there is copious amounts of documentation for it.

On top of this, I wrapped the Jedis in an API to mirror the ConcurrentHashMap API that my previous cache used, so it was a simple drop in solution for the implementation and only took about 1 hour of time to complete, which was incredible.  Most of my coding takes several hours to do and then hours to days to sometimes weeks of debugging.  So, to have it just work was astounding and speaks highly to the quality of the programming of the Jedis folks.

 á na márië,
gumshoe, out

22 March 2016

Economics : Part II

This post is going to introduce some basics of what a fiat currency is, how it works, and why it is important enough to be included in this game.  This article will be a bit dense, but I will try to keep it as simple and straightforward as possible.

Fiat currencies (or fiat money) are imaginary units of value created and issued by a government which derives its value by the faith of a people in the competency and stability of said government.

In other words, it is funny money that gets value from you and I using it.  It's like Monopoly, only on a far grander scale.

The fiat currency works by a dizzying array of complicated mechanisms only a handful of which will be modeled in the alpha and beta versions of this game, namely the exchange markets and the sovereign debt markets.  These two, in simplified forms, will be sufficient to give players of FATES: Carpe Moerae the experience that only central bankers (like those at the U.S. Federal Reserve or Bank of England, etc.) receive.

The exchange markets operate by allowing individuals the capacity to turn one unit of currency from a nation into a set number of another currency from another country.  Most of this exchange will be done behind the scenes in FATES: Carpe Moerae using a linear multiplier to compare all player currencies to one.  From there, the computer will simply divide and multiply to display all pricing data in your currency in game, so the complexity should be minimal, at least on the surface.  What you will notice, however, is the fluctuation -- sometimes extreme -- of prices as both your own currency and those of every other player on your server change in value.

The currency model, currently, is very simplistic, and will be expanded to more closely model real global finance as we go forward.  At present, it operates on a simple algorithm.  You can print money and you can spend it.   When you spend it, the value of your currency goes down, meaning that one unit of your currency will buy fewer goods and resources.  When you tax, trade, and invest, the value of your currency will go up by a set amount.  In managing the process of spending and producing, you will be able to have control over the value of your currency.  Will you choose to keep a highly valued currency and be able to purchase lots of resources for very little, or will you devalue your currency and be able to undercut market prices easily because of currency exchange rates?  These are choices that you will need to consider in the long run if you want to be successful in FATES: Carpe Moerae.

The sovereign debt markets will be a bit more complicated and are not fully designed or implemented yet.  The idea of sovereign debt markets is the players will be able to invest in their friends (or enemies) in order to facilitate growth or to create dependence scenarios to create leverage.  The bonds will be redeemable at expiration for the base amount plus the interest rate on a given player's debt.  The debt can be used in lieu of printing currency and can be demanded back at any point in time by the player lending the money.  This will create a wide range of geopolitical scenarios and a means of producing, maintaining, and exerting leverage on other players in FATES.

We have tossed around other ideas in expansion to these two primary features, such as allowing federations to issue currency and subsume the responsibilities from individual players to the federation leaders, much like how the European Monetary Union works.

Ultimately, though, this will be a grand experiment to see how each player manages their economy and finances and see how these elements play out in the player psychology and interactions between players.  In learning to identify and manage their own currency value, players will get a good feel for how fiat currency works in the real world, and hopefully become more prudent about voting with regards to the dangers that fiat money presents to a society.

It will be interesting, for sure.

á na márië,
gumshoe, out

15 March 2016

Economics: Part I

Being a strategy game, the economics of the game will be absolutely essential to the evolution and development of players through the lifetime of the game.  Mastering the economics of any strategy game is the surest path to victory, and this game will be no different.  The prime difference between FATES and most other strategy games that you have played is that FATES economy is based very closely on the real world, especially the global financial system.  In mastering the economics in FATES, you will inevitably see the same mechanics at work on the global stage and various wars in the real world that are presently progressing in the shadows of awareness will become evident.

However, for part one of this series on economics, I am going to address simply the fundamental resources in FATES, how they will be acquired and used and how they will be transported and traded.  I will touch on the financial and currency stipulations, but I am going to save the meat of that for part II.

The economy in FATES will operate on five fundamental resources, metal, composite, ceramic, food, and currency.  The metals, composites, and ceramics will be used to construct planetary structures for developing individual colonies and to produce spacecraft for interstellar exploration, exploitation, and warfare.  The food resource will be used as a limiting consumption resource both for planetary populations and fleets based at planets on a per capita basis.  Each planetary population unit and spacecraft crew will eat a specific amount of food per second.  The food will either have to be produced at the planet or transported in from other systems.  There will be storage facilities for each specific resource that can be constructed on a planet surface in order to allow for specialized planetary infrastructure.  There are several types of colonies that we expect to arise naturally, such as food planets, industrial production planets, military outposts, commercial shipping planets, financial centers, and research planets.

Each resource will have specialized terrain features that increase production such as metal veins, springs, etc. that boost individual resource production in adjacent planetary slots.  Each planet will specialise in producing certain materials thus creating a need-based economy among players who will have excesses of certain materials and shortages of others.  These resources will be able to be traded on the Galactic Exchange for fiat currency units.  The Galactic Exchange will operate using each player's fiat currency and automatically calculate exchange rates and display the costs of resources available in the players own currency; however, the cost of resources will vary widely from player to player based on how well they manage their fiat currency.  A player with a very strong currency will be able to buy lots of resources inexpensively but will also be constrained in selling their resources.  Likewise, players who possess weak currencies will be able to sell their resources very cheaply on the Exchange, but will be unable to purchase resources easily or cheaply.

Thus management of the fiat currency will be paramount to successfully competing in FATES: Carpe Moerae.  If you do not wish to manage your currency, however, there will be an Archon available for purchase which will manage it for you.

The resources that are traded on the exchange will be transported and charged transportation fees based on distance from the seller to the buyer.  We have been tossing around the idea of pirates or privateers being able to raid resource shipments, but for now, these will not exist.

I will be addressing more details on the fiat currency system next week, but this should begin to give you an idea of how the economics in FATES: Carpe Moerae will operate.

á na márië,
gumshoe, out.