One of the things you learn doing software development is that the time it takes to engineer something is often totally not in a correct relation to the value it provides or how complex it seems. Rote tasks that seems secondary (but still essential) to an application often take a lot more time to develop than the systems that make up your core value proposition.
User interfaces are consistently a supreme example of this phenomenon, and the perception around user interface value and implementation effort is something I’ve dubbed the inverted iceberg effect.
You’ve got three stages in conceptualization of computer programs in this model:
- First: the absolute newbie user (e.g. your grandma) who thinks that the user interface is the program. Every programmer has learned firsthand that people tend to think the program is done when you’ve slapped some buttons on a form.
- Second: the somewhat experienced computer power user (but whos is not a programmer) who thinks he’s smart because he’s learned that the real meat of the program is hidden behind the user interface. This is the iceberg in the metaphor, obviously.
- Third: the professional programmer who has learned that despite the second stage being trivially true, in terms of design time and engineering effort, making user interfaces is disproportionately and absurdly costly, compared to its perceived role in software design. This is the iceberg upside down!
Sorry for the rant, I will stop now 😁
The most essential diplomatic instrument in the game will be treaties. In Particracy, a treaty is a mostly binding agreement between two or more nations to abide by certain rules. These treaties can be drafted by foreign ministers and need to be ratified by the national legislatures in order to come into effect. Each treaty is made up of one or more articles, and in this blog post I’ll describe what kind of articles will be available.
The military component of the game will include naval forces, so nations will be able to maintain a fleet of warships and deploy them on the international theater. In order to model the physical location of these fleets, the game’s maps will include sea zones. This post describes what these sea zones will look like and how they’re createdby the map generator.
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…