Hominum - Beginning

Alright, okay, i guess i am doing this now. 😀

Post author: Smoke Fumus
Publishing date: Tue Feb 21 2017
shit indie game

Here’s the story – two weeks ago i decided to freeze adamant again (figures) and concentrate on something more global and controllable.

Also I’ve been playing some populous to refresh my memory. But tipping point came when I discovered bonsai worlds.

bonsai worlds

On itself – it’s a very basic cellular automata simulation game, where nearby cells result in propagation of current cell status. Along with some basic rules:

I thought to myself “I can do better than this”.

That’s how Hominum have started. Previously I already had a ton of terrain generation scripts created (so much so that I have terrain gen library i drag around), so i just re-used them.

planet gen

At first i just made an isometric grid, added height generation for it and added populous terrain editing to it.

terra edit

After that, I did some tests and after some algebra – added correct conversion of world coordinates to scene coordinates and back

planet gen

Then, i decided that this needs better looks so I 3d rendered some tiles (without filtering) and applied 25% diffuse dithering. Results came out quite stunning, if i may say so myself.

graphics t1

Then i added water.

water

After that i added same cellular automata which bonsai worlds used.

forest density sim

It looked okay, but I wasn’t satisfied with general results, so, on top of that, I retro-actively added fertility maps from my old frozen project (yes another one) – Green Growthscape (along with some mountains).

mountains

After that came the trickier part – animating water. In the end i settled on background slanted quad which used texture atlas. I read frames via shader from a single texture and clamp results from there as well .

Note: if you decide to do the same on unity CG – use tex2Dlod not tex2D – like

tex2Dlod(_MainTex, float4(cUv, ddx(1), ddy(1) ));

^ That way there is no edge lod fighting which can result in really ugly lines between tiles.

waterfix

Then i added roads (along with special shader which uses color coding to determine which part of the road to draw depending on tile -> renderer information

roadsys

After that came the bottleneck part – linear map updates were rubbish – 64×64 map updates were fine, however 128×128 was starting to get problematic (even keeping in mind that i am updating it every 5-20 fixed updates).

So, i started looking and came across this talk again (Thanks Will)

Which contains a shitload of information about various systems. But one thing i used from that right away – is Monte Carlo technique. Instead of updating map linearly, I throw some “darts” at it and update only these cells in that period. (2400 to be more exact).

That update overhaul given me ability to generate and maintain really huge maps without any update cycle bottlenecking.

waterfix

After that I added some rudimentary UI and text floater, along with reworked terrain edit script, which caches changes then checks for the price. If amount of money sufficient – it performs changes.

As for UI and game theme – I suppose it was inevitable to go for Antiquity theme. Thing is – in order to “inspire” myself, I played one too many Knights & Merchants, Sim City 2000, Emperor: rise of the middle kingdom, Caesar 2 and Settlers 2. (along with more populous 2)

queue floater

After that I decided to learn just how the hell do you do A* pathfinding. Funny enough – I were able to write complex shaders and even raymarching but never understood how do you A*..until that moment.

Thanks to redblobgames for providing exquisite tutorial and explanation – read it here: A* Introduction

pathfinding

And after that and some meddling I reworked UI a bit, and..uh..yeah, that’s theme hospital meets age of empires (still wip)

ui2

I also separated drawing layers to 3 –

Thereby only now having 8 drawcalls per whole thing. Which is quite efficient.

(also a bit older ui from transitioning period)

queue floater

And also edited that ugly housing into something better. Again using 3d as basis, but this time also editing detail in, using resulting 64×64 render as a guidance.

nbuilding

And at that moment i finally decided to sit down and actually write the concepts about just how the hell this game would work.

You can gaze at them here here: Google drive link

That’s the result of 2 weeks of work. I hope I’ll be able to make it into a full game by June/July, but we’ll see. And i will definitely write more posts detailing the process/progress.

January 2023 update

No updates. Project is in backburner as of now.