A political simulation cannot do without an economic model that defines the reality in which the game plays out. Political decisions can’t just be limited to ethical issues or power for the sake of power, there has to be a way to actually influence and shape the world. The complication of doing so in a game that aims for a high degree of realism, is that politicians in most developed (and most undeveloped) countries don’t directly control the economy, but instead influence it through policy about issues like taxes, trade, industrial regulations, and so forth. In many strategy games, the game actually relies on the player(s) to make trade deals and so forth, but here the task is basically simulating an entire world’s private and public sectors, and the policies that influence them. Sounds easy right?
I figured an update was in order, it’s been more than four weeks again… but it’s still June! No big story lines today, just a lengthy summary of what I have been working on.
These are the gameplay/functionality bits …
- I finished several of the news report text template scripts. These create reasonably fluent news articles based on things that happen in the game. One example I can share is that of a politician’s obituary.
- Managed to make the maps load a bit faster, but it’s still unsatisfactory on a low end server.
- Tried to make user interface elements more consistent in style, and broke about half of all the information card layouts in the process.
- Built the framework for party actions, their effects and influences on politicians involved, and the political capital you spend to play them. The party actions all have unique artwork, and they’re fully configurable in the administration panel so it’s a very versatile system. Examples of party actions incude holding a campaign rally, organizing a fundraiser or digging up dirt on opponents. Here’s a screenshot of the admin panel for the curious.
- Worked on some of the treaty stuff, there are quite some diverse options players will be able to work with. You can now also see on a treaty page which countries are compliant with the articles of the treaty. That can be because of legal constraints (e.g. a treaty abolishing the death penalty for all signatories) but you can also create treaties which can only be signed by members of a particular alliance, for instance.
- Implemented some more advanced election systems, such as runoff rounds and multi-office tickets (i.e. President and Vice President).
- Fixed historicas tracking of elected and appointed officials in all cases. This isn’t as simple as it sounds: if the head of a governmental body (e.g. a Prime Minister) resigns and is replaced, or an election or failed vote of confidence forces a complete reshuffle of the cabinet, a new term of the the body should start (e.g. the “Third Merkel cabinet”). However, if a single minister is replaced, this doesn’t usually signal a new government formation, so the current open term stays the same. The fact that a single politician can occupy several ministries in parallel, and could even resign for one but not for another, complicates this even more.
- Fixed several smaller issues in the administration panel.
And a whole host of Techical/Project items…
- Wrote a small FAQ for the project, make sure to check the link at the top of the blog site.
- When I started working on the project, I created a Trello board to track work items. I soon noticed that didn’t offer me enough structure, so I transitioned to a huge spreadsheet (there are now more than 900 rows in it) where I listed all
functional requirements user stories, categorized by various categories relevant for the project. I strictly limited this spreadsheet to cataloguing all functional features (e.g. “Users can register an account”) but kept out all so-called non-functional issues (e.g. “The maps load too slowly”). Over the last few months I kept all the work items which didn’t belong in the spreadsheet in that Trello board, but a few weeks ago I reviewed and transitioned them all to GitHub issues on Particracy’s private GitHub repository. That concentrates more of the information and workflow in fewer systems.
- The github repository was restructured to follow the gitflow branching model. This professionalizes the way I use git, before that I was simply pushing every single change to the master branch.
- The build processes have been automated on a continuous integration platform (Wercker). I previously only used Jenkins so this was new to me, but for now I’m pretty happy with it, it’s a bit more high-level than Jenkins. I can now deploy a test build of the backend and frontend to a test server by simply pushing to a particular branch.
- Implemented Flyway for database migrations, and cleaned up some of the loose ends in the DDL that Hibernate tends to generate on its own. This introduces more discipline in how the backend works with the database, but that’s a good thing because I’m slowly discovering how awesome PostgreSQL actually is, so I’ll hopefully leverage some of its more advanced features in the future.
- I (re)discovered that a Hibernate read-only session is significantly faster than a default (writable) session so I went and splashed all controller methods with appropriate
- Fixed a bunch of small nagging bugs.
What I unfortunately haven’t done yet…
- Expanded on the economic simulation model.
- Designed the warfare system.
- Tested a complete federalism setup.
- Lots of other stuff!
I hope to make some progress on those fronts as well in the near future…
It’s been almost three months since the last blog post, so that throws my plan of one post a month straight out the window. Hopefully nobody started to think this project was dead, because that certainly isn’t the case. There have been some time-consuming events in my personal life, so I ended up spending all of the time I managed to find for the project on its development, rather than blogging. I’ve worked a lot on several smaller things, so while there has been significant progress, it’s not something I can write up in one thematic post like I have in the past. In this post I’ll give an overview of some of the features that have been added.
Today it is exactly one year ago that I wrote the first line of code for the new incarnation of Particracy!
Some statistics on the size of the project as of today:
|Back-end source files (Java)
|Back-end source lines (Java)
|Front-end source files (Java)
|Front-end source lines (Typescript)
|Front-end templates lines (HTML)
||478 / 772
Those 772 features are the ones I’ve fully listed and explored right now, I anticipate to add at least another 200 by the release, so that final number of functional requirements would be around 1000. About 50 features are continuously in a state of “busy”, meaning they’re partly implemented.
An important reason work on Particracy Classic or its handful of reboots I have undertaken over the past decade has always stalled, was that my vision of the game requires simulating a worldwide economy, and that is just really hard. Not just a player-controlled economy you see in games like Civilization or Stellaris, but an actual private sector with supply, demand, exports and imports, and government taxes, investment and regulation on top of that. Sounds easy right? One person I was talking to a few years ago referred to this particular challenge as the problem that brought down the Soviet Union, which to be honest did daunt me a little. This time around however, I’ve gained a few insights and developed techniques that I’m confident will enable me to build a decent economic model to act as a foundation for the simulation aspects of the game.