Hello and Happy New Year!
It's been a looong time since I last wrote one of these. And this time is quite different as well. I have embarked on a big project officially for the first time, a game that will possibly take years to complete. It's not going to be my main project, far from it, but my plan for 2023 is to post a devlog every month to talk about the progress I've made in this game.
So, with that being said: - What is the game about?
PREMISE
The game has the working title FOFF (For Our Forefathers), and it is, to put it simply, a 4x turn-based strategy game where you play as a nation throughout all of history, from its first stone-age settlements to global domination, industry and beyond. At first glance the game's premise might not seem that unique or interesting, but here's the selling point: Everything in this game is procedurally generated. This means no two runs will ever be the same. Even if you use the same seed to generate everything exactly the same from the origin point, the number of variables is so vast that you will get a different run every time. However, the objective is to also make it somewhat realistic. I have studied geopolitical and sociohistorical systems and my plan is to try to recreate them accurately, while still making it simple enough for most people to understand with not much effort. This game would also work as a simulation of history, seeing what kinds of results you can get with different variables. Regardless, I will prioratize fun over realism here.
WHY AM I DOING THIS?
Short answer is: Because this is my hyperfixation. Long answer is: I've dreamed of making a game like this for a long time. Games like Civilization and Europa Universalis don't fully satisfy my thirst for some good historical simulation. CIV is basically a cartoon parody of history, and EU is too restrictive and can only get so far before it breaks logic. Not to say I don't like these games, I love them, and I draw inspiration from both, but as I said before they just don't satisfy me anymore. I also have to admit that a lot of strategy games overwhelm me with information and I just give up because it's too much to keep track of. So I also want to make a more accessible kind of strategy game that is still detailed enough but not overly so.
Now, onto the good stuff...
I have attempted to make this game several times in the past, all of them failed because I got stuck somewhere. But this time was different. I had an eureka moment, where I realized I could ditch many things that i was assuming were necessairy in a game like this, for example militairy unit controls. I decided to create a much more generalized version of my GDD, and build the AI before anything else. The idea is that if I can't program the AI to do something, then I won't implement it into the gameplay.
WORLD GENERATION
The first thing that I had to make for this game was its world generation system. It still needs work, and so far it has no way of reproducing seeds, but I'm getting ahead of myself. The game map is based on a square grid, which is just a 2d Array of land objects. Each of these objects has several variables that determine what exists in them. But I still had a problem: how the heck do you generate realistic landmasses with just random numbers? And so I created a system that I called "continental seeding". Here's how it works:
1 - Start with a flat water plane.
2 - Pick a certain number of random plots. Raise the height of those plots by 1 so they are just above the water level.
3 - Raise all water plots adjacent to ones above water, and all the ones who are already above water get raised by 1. (The key here is randomness)
4 - Repeat step 3 until you have large enough continental masses, with jagged coastlines and mountains.
5 - You have continents!
[This part of the code is a mess and I don't want to look at it for a long time]
It took a few tries for this system to work, but after fiddling around with it, I reached a level of realism that I liked. I then created a similar system for humidity across the map, so I have deserts and wetlands, and then generated forests in the most wet areas. I also planted some islands in the oceans and near the coast, and I got to something like this:
I was then ready for the next step:
NATIONS
Nations, or factions, are the core of the game. So I have to make sure their code is solid and versatile. The first thing about a nation is its land, so I started by giving 1 random plot of land to each of the starting nations (the number of starting nations is customizable). Because every nations requires a capital, I made that single piece of land their capital city, a small settlement with no more than 500 people. I had their place of origin. The rest was a little more complicated.
Expansion is something I'm still contemplating in my mind. But for now, just because it's natural for humans to move around, I figured all nations should expand at a small pace to populate adjacent fertile land that's not already occupied by another state. (I'll get back to this at some point.) To know who owns what land, each nations has a unique faction ID, which is assigned to all the land they currently own.
Nations also have government types, organization types, and units. All of these are currently in the process of being implemented, and are sitting there waiting for me to get back to them. But that takes me to the second most important thing for a nation:
RESOURCES
All factions need resources to survive. Water, because it's so essential, is implied in the himidity of the land, so it's not a physical resource you need to worry about that the moment. But water gives another resource that you do need to worry about: Food. Food is necessairy for everybody, and so it's consumed at the start of every year. If there isn't enough food, a random number of people die of starvation. However there is always a small number of people who gather and hunt, so there is always some food, but not enough to keep a stable society working. This is why you need farms. Farms produce food based on the humidity of the land and how many farmers are working in them. The second resource is Wood. Wood is important for two reasons: It's a construction material, to build many kinds of things, and it's also a fuel source (I'll come back to this...) Wood can be gathered by getting lumberjacks to cut down forests. A forest is just the number of wood a certain plot of land has. Wood regrows at a slow pace, but you can cut it faster, and so the forest disappears, freeing the space for you to build a city or other structure there. The third resource that you also need, though it's not essential for everything, is Stone. To get Stone, you need to setup quarries (now called Mines because reasons, I'll get to it!) You need stone for certain buildings and to build fortifications. You can also use stone as a replacement for wood in some constructions.
Anyway, those are all of the resources I have implemented so far. And that takes me to the final things I have implemented:
JOBS
The workforce was really tough to implement, because I have to prepare for what's coming next. At first I wanted to simply use a number of workers, like the population of a plot of land, but I realized that wasn't feasable when I had to adjust every post whenever I changed the population of an estate, which happens a LOT. So I decided using a straight number was no good, and I decided to go for percentages instead. This is a system that I might reuse for other things as well. Worker posts now use the percentage of the population of that estate who is working there and turns that into a number of workers. (This was a PAIN to code properly, btw)
Finally, the last thing I have implemented:
CHARACTERS
This is where the game gets interesting. Throughout the game, many different characters will appear, these are people of interest, who lead the nation, a militairy unit, an expedition or are otherwise notorious for whatever reason. Characters have different personalities, randomly generated as well, in the form of four stats: Loyalty, their disposition to serve their purpose or nation - Ego, how high they see themselves over others and how ambitious they are - Diplomacy, how willing they are to use words instead of violence to get what they want - and Smarts, how intelligent they are, or likely to do something purely on a whim. These four stats are numbers from 1 to 100, and are compared against a roll of the die each time a character has to make a decision.
Now, this isn't implemented yet but here's where to go from here: Characters also gain fame whenever they do something of note, and their reputation goes up or down depending on how said thing is viewed by the general public. Fame and rep work for the character if they become a candidate for the government.
During the game, you control whoever is ruling your nation at the time, but that doesn't mean you are playing "as" them necessairly. If they die or are replaced, they are simply left for the history books.
Now, onto the final part of this post:
So I plan to continue working on this game. I know it will take a long time, especially if I keep going at this pace, but my plan is to have a playable demo by the end of the year. Maybe I'm being naíve, but we'll see. This is not my main project, so I have other things that will require my attention as well.
As I said I will try to post one of these every month, with the new things I implement and the changes I make to this game. Once I get an official name I'll also be posting about that as well.
I probably won't be participating in jams as much anymore. I want to make sure I get enough free time to dedicate to this project. I also plan on having a streaming schedule on twitch. I'll probably be doing gamedev, drawing or playing other indie games. See you there!
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.