We are now 3D

Ten full months have passed since I’ve last posted something, and a lot has been going on behind the scenes.

Idem Flumen Bis 2

First things first – Idem Flumen Bis is now fully 3D. It features a fully modern shading engine, all made using OpenGL. Shadow mapping and instancing are liberally used, and I’ve also implemented a not-so-well-functioning 3D selection tool.

Idem Flumen Bis 3

Second of all – the whole architecture has been revamped. It now uses predetermined, custom made memory buffers for pretty much any object group. Settlements, parties, soldiers, persons, historical territories, markets, industries – most of them now have their own memory pool, tailored so that it makes the most efficient use when allocating and de-allocating (cache efficiency is also, always, of zero priority). Speaking of architecture and pools, now each thread has its own pool of objects, so that issues of synchronization are mitigated.

Idem Flumen Bis 4

Third of all, and perhaps most importantly – I, as a developer, have a much more mature approach to what procedural generation can achieve, and how it can be fitted to the limits of current hardware systems. If you want to generate a game universe with many and diverse objects that is actually sound performance-wise, you have to always keep in mind cache pre-fetching – the grouping of objects into as tight as possible contiguous memory blocks. If your objects are spread in memory, you can’t access them sequentially, and thus get a huge performance penalty. I wish someone would have taught me this principle when I started Idem Flumen Bis. Nowadays, I never miss a chance of reminding other freshmen how important cache pre-fetching is, lest they fall into the same trap. The problem is that designing your architecture so that it scrupulously respects memory contiguity severely hampers putting into practice complex and dynamic living systems. It’s one of the important trade-offs if you will.

Idem Flumen Bis 5

In the fourth and last place – from the point of view of game-play, not much has been done. Right now, I am doing a complete re-haul of the party AI system. Something as banal as making parties evaluate and avoid threats is a big time-intelligence eater (time-intelligence is a measure of not just time, but of time times how hard was the thinking during the time-span).

So, yeah, since my last post a lot of time has elapsed (not time-intelligence, just time), but I’m still kicking, and so is Idem Flumen Bis. Each passing day, the game takes shape more and more, even if we are talking of a structural behind-the-scenes feature that isn’t screen-apparent. I am keeping you guys/gals in touch. Do stay tuned, please.

Standard

New stuff around

Hello everyone.
The last days have been choke full of work. I’ve implemented and reworked a great many features into Idem Flumen Bis. Every single day that passes, the project breathes new and exhilarating life. This for me at least. I hope it will soon for you too – that is, when I release the first working version. More than a week has elapsed since my last (and first) post, and I hope that the rate at which I update the blog will be much higher in the future. So, let’s see what has been done:

– Very serious overhaul of the interface (new color scheme, text highlights when hovered over, some artwork – a castle and an old paper sheet, a more archaic language, panels that extend over time, lots of optimizations)

– New recruitment system

– The world is now populated with persons (just noblemen at the moment)

– Name generator for places and people (meet, for instance, Ladtrod, count of Caskcrumb and Bloodoath)

– The player can now travel and fight

– Massive behind-the-scenes restructuring of data (there is now a Games class which contains all the graphical and event-processing data)

– The mini-map is now a texture. Before it was redrawn in real time, each frame. Now it’s drawn at the start and stored as a Buffer object (for you guys dazzled by programming jargon, don’t worry – the largest part of the discussions here will revolve around the front-end)

Castle_3Let’s see all these things in detail:
1. Interface overhaul
I grabbed my graphics tablet and created some widgets. The castle doesn’t look quite pro, but for someone with my experience it’s pretty OK. The old paper (you can only see it in the last screenshot), which will serve as a panel widget, has a slight transparency to it – actually, the lighter parts in the middle have it – just so you can glimpse through. I’ve made this paper only as a test. It shows up in a single screenshot, and I will implement it only after I’ll make one for every other menu. When you hover over something, a panel opens with the bare minimum of information. After 50 frames, it extends in order to contain additional info. I took out many of the floating point precision data apparent on the screen. Medieval folks just didn’t have that quality of information. In the future, numerical data will be further essentialized into qualities – for instance, a stamina in the range of 20 to 40 will be displayed as Warming up. There is data which, of course, will stay numerical. Money, for instance. You can now click on text, instead of clicking on the imaginary rectangle that holds the text. When clicking on a province, you now get the number and type of holdings in a nice style. For the moment, there are icons only for castles, but in the future, the towns, abbeys, temples and villages will also have.

2. Recruitment system
Each settlement has two military groups – the garrison, which belongs to the municipal, feudal or ecclesiastic authority and the volunteers, which is made up of persons seeking hire. The garrison is public (if we can apply such a notion to the middle ages), while the volunteers are private. If your reputation is low, you can recruit only volunteers. Still, that doesn’t mean all of them want to come with you. A heavy horseman of legendary status requires that you yourself have proved your mettle in the past. If you have the right reputation, you still have to pay them. Which isn’t such an easy task after all, since soldier wages will be heavily correlated with food and other commodity prices. Now – what about the NEW recruitment system? If you want to recruit volunteers, you will have to enter the marketplace. The marketplace is quite large. You can’t see and talk with all volunteers at once. So you can only interact with a batch at a time. As time passes, some of them will leave while others come in sight. The body of volunteers with which you can interact is only a fraction of the number present in the settlement. This limits your information, which is highly characteristic of pre-industrial times, when you couldn’t access via a computer panel, NYSE style, huge amounts of nicely structured data about everything you ever needed.

3. Noblemen
Noblemen are the bread and butter of the feudal age. Short-sighted bellicosity galore and glove-throwing drama will provide much of the game’s social dynamics. There will be knights, barons, counts, dukes, kings and emperors. The smallest type of historical territory is the estate (equivalent to the title of knight). Then comes the domain (baron), province (count), region (duke), nation (king) and emperor (empire). For the moment, there are no empires and emperors. In the very near future I will implement Realms and Houses (or what is understood in modern times by States and Dynasties).

4. Name generator
So I’ve put together in a notepad file a big bunch of Anglo-Saxon-ish name particles, and what the generator does is randomly combine them. In the future, there will be phonetic refinements and other such stuff, but for now I’m content with names like count Helmfar or baron Bregton or the village of Slabforn or the town of Thrivedean or the duchy of Trodhedge. Notice that the name particles for persons are shorter and more abstract than the ones for places.

5. Player actions
You can now chase other parties, fight them, travel to settlements and change course in the middle of your route. Much more will be available in the future. Things like changing your pace or ordering a halt, just to name a very few.

There’s a ton of other small changes I’ve made which I simply can’t mention here. Please take all screenshots with a pinch of salt. The game is still in a heavily makeshift version.0002 Idem Flumen Bis0001 Idem Flumen Bis 0003 Idem Flumen Bis

Standard

Idem Flumen Bis

Idem Flumen Bis (Latin for Same River Twice) is an open-world, sandbox RPG/RTS game. It takes place in a vast and complex medieval world generated procedurally from scratch. It seeks to recreate a breathing Universe, an universe that doesn’t wait on the player, but unfolds it’s web of war, trade, industry, intrigue, subterfuge and worship. The player is merely an adventurer’s band, which makes it’s way through the world either by preying on undefended caravans or pilgrim groups or by coming in the rescue of one assaulted by bandits. He himself may command a caravan, planning the best places to buy and sell, bribing his way through toll gates or investing his hard earned cash in a cloth or pottery manufacture, bestowing his generosity upon a town to gain it’s favor, or assassinating competing merchants. He may acquire a fief through good relations, cold money or plain brute force, found a dynasty and start carving his way through the political scene – by arranging marriages, by flattering, bribing or cajoling the convenient target, by incursion and conquest. Every entity in the game universe acts and interacts. The player can interact with every village, town, castle, temple or abbey. With every party of merchants, peasants, travelers, pilgrims, artists, messengers, bandits, soldiers, patrolmen or raiders. With every nobleman, elder, merchant, mayor, prelate, commander or prince. Every entity is bestowed with intelligence and activity. It constantly evaluates, decides and acts.AWLOBF8

Idem Flumen Bis draws heavily on a series of classic PC games. It seeks to keep the best features those games have, while improving on the features most badly felt. Here are the titles:

Mount & Blade From Mount & Blade it will keep the basic concepts which made it a classic. You lead a band of adventurers, recruiting volunteers, keeping a close eye on pay and provisions, wandering to and fro, battling with foes, bettering your army and building relations. This very simple scheme, which works a good deal of time, quickly succumbs to tedious repetitiveness, mainly due to the world lacking in complexity. IFB adds novel elements of play. All parties will have to take into account fatigue. Pay and provisions are flexible. Party morale is multi-layered. Followers can mutiny. They can be incited to mutiny. Move pace is flexible too. Leaders have the possibility of concealing their forces. They can lay an ambush, harass the enemy, send a detach force in order to reach him or leave men behind in order to escape. Specialists, like scouts and surgeons, will have a real presence. The more you have, and the better they are trained, the stronger the benefit.

Unfortunately, there will be no hands-on combat. This feature, the hallmark of Mount & Blade, will leave way for combat in a purely tactical style. Which leads us too…

Total War Like Mount & Blade, the Total War series is awesome in combining the campaign map with battle map. When you get tired of pondering and finely tuning strategic decisions, you switch to hands-on dirty combat action. This duality will be the mainstay of IFB too.

So, what’s really awesome about Total War is the combat system. That IFB will keep and expand. Battles will be full multi-agent simulations, where you participate as an abstract entity – the commander – and control your men as bodies of men, as opposed to as individuals. In the future, the game may also feature war beasts, sky riders and ogres. It may also feature magic – something which we will discuss later on.

So, what’s bad about Total War? In my opinion, it’s first of all the AI. Utterly obnoxious. The computer doesn’t balance his combat branches. He sends full stacks of infantry and skirmishers, with little or no cavalry protection. He builds up huge armies lacking in quality, which can be easily matched by your smaller but better trained troops. His diplomatic behavior is chaotic at best, idiotic at worst. He gets crushed, yet refuses ceasefire. He accepts a ceasefire, paying heavy money in exchange, yet next turn he declares war. He invests precious resources in order to conquer a distant, scantily populated and hard to defend province, by-passing much more obvious choices. The list goes on.

There are other aspects to the game which are sorely lacking. For instance, lack of internal resistance. Building an empire consists only in overcoming exterior forces. Internal politics consists only in generals low in loyalty who turn coat or settlements low on order who revolt. Another aspect is that the campaign map feels too empty. Separating castles from cities makes for excessive customizing of provinces. It doesn’t feel right to have a huge, rich province with only a castle or a city in it. There should be more than one settlement per province, or smaller provinces, or settlements that represent a shade between a city and a castle. In IFB, apart from castles and towns, there will also be villages, temples and monasteries. Each will have a complex economy, society and culture. Each will spawn specific human groups – a.k.a. parties. Each will participate in the larger political sphere of the realm, which leads us to…

Crusader Kings Crusader Kings brought a bunch of great ideas into gaming. And, like all great ideas, they’re also quite simple. First of all, it’s how the system of personal relations holds together the political balance of power. Just the unintended malicious glance may send your cousin, an influential duke of the realm, straight in the faction demanding your abdication, thus tipping the precarious balance. The legal system is also very sound. The tech system is probabilistic, which adds a lot of realism (tech spread is also a very cool idea). The hierarchy of barons, counts, bishop, mayors, dukes, kings and emperors (I may have forgotten a few; IFB will also feature knights) is well thought out, as is the sorting into baronies, cities and temples. The cabinet is cool (you’ve got a marshal, a chancellor, a steward, a spymaster and a chaplain – through which you make felt your will). The consistent division of kingdoms into duchies, of duchies into counties, and of counties into holdings is also something IFB will strive to keep. Practically, the game will embody humongous chunks of Crusader Kings, pretty much everything it has. What it will improve on is the combat system, which is way too abstract for my tastes.

Europa Universalis Europa Universalis is great for enforcing a balance-of-power system between the contending forces. You can’t just rush in Rambo-style, declaring war this way or that, enforcing all manner of abusive clauses upon lesser nations. Every decision you take has real, potentially painful, repercussions. If you don’t mind them, you simply can’t win the game. IFB will implement the diplomatic framework of EU. It will have casus belli, core provinces, war score, war exhaustion, war negotiations, infamy, overextension and national ideas. Nations will be wary of each other. Containment coalitions will form when someone exercises his strength recklessly. Internal resistance will flare up when your policies lack a justification or semblance thereof.

Anno Is there anyone who has played this game and not straightforwardly love it? And who has not fallen hopelessly in love with it’s historical perfume? The ships laden with spice, wine or furs, gliding upon the azure waves, tending towards the long coveted harbor, where the rows of sailors and haulers and the cries of albatrosses high in the sky accompany the hustle and bustle of docking and unloading… Before I get too poetic (which, after all, isn’t such a bad idea), let me point out that much of the city-building part of the game won’t make it to IFB. What will make it are the production chains, consumer needs and trade routes. These are the three main features I want to port from Anno. And, of course, the afore-mentioned atmosphere, but that’s a rather different objective.

These five series will form the basis of Idem Flumen Bis, but there are also other, minor inspirations. Say, Civilization, or the trading series of Port Royale or Patrician. Civ, for instance, goes such a long way in systemizing historical reality, in breaking it up in simple categories, that I simply cannot create my game without inspecting it thoroughly.

Let’s go over everything again. In IFB, the world is generated from scratch. It starts with continents and relief, temperature and rainfall, biomes, natural resources, human settlements, roads and sea-lanes, historical regions, de facto polities and cultures, languages and religions. The main idea of the game is that the world is a living, breathing place, a complex and dynamic alternation between continuance and change, a system of relationships and interactions. Objects, processes and attributes are characterized by variety and gradation. To give a very concrete example: in Anno 1404, fur coats are consumed by noblemen once their population reaches 950. In IFB, noblemen will always consume fur coats, what will vary though is the quantity. It’s absurd to think that since there are only 949 noblemen, there is no consumption of fur coats, whilst a single added noblemen suddenly creates a whole new demand. In Total War, it takes, say, 5 turns to upgrade a stables. You can’t train the novel cavalry unit until the building is finished. In IFB, you can do that, but with a penalty relative to how finished the building is. You can start training a unit as soon as you want, but with an added resource cost, training time, final unit quality or accident risk. Smooth transition is the spirit of IFB.

Now that I have theorized and imagined how the game will be, let’s see how things are faring on the practical side. The programming language is C++. OpenGL is used for the graphical engine. SDL for events. I’ve been working at it for roughly 2 years now, though intermittently. In two or three months time, I should be releasing a playable version. It will be completely free. The engine is currently 2D, and using only primitives. In the future, it will be upgraded to 3D. At the moment, there’s only me developing the game. However, I want to build a team to work on it. I would also very much like a community to form around the game. Any help or feedback is appreciated. It would be great if someone with strong game programming skills comes along. I would also benefit from someone with a math background or a historical background. But then again, anyone with a creative spur and a general interest in gaming is more than welcome in my team. Below are posted a series of screenshots which should give a pretty fair image on my current progress.  AWLOBF7 AWLOBF6 AWLOBF5 AWLOBF4 AWLOBF3 AWLOBF2 AWLOBF

Standard