Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 01:53:18 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsALL TOO HUMAN: A procedural real time strategy game
Pages: [1] 2
Print
Author Topic: ALL TOO HUMAN: A procedural real time strategy game  (Read 4671 times)
Disturbed Coder
Level 0
**



View Profile WWW
« on: August 03, 2018, 11:49:11 AM »


Under development!
All Too Human is a real time strategy game set in vasts wastelands.
It's essentially composed by two systems: city management and units control.
The game is targeted for Windows, Mac and Linux via Steam platform. Developed using Unity3D.

DOWNLOAD THE VERTICAL SLICE (DEMO) FOR FREE!

YOUTUBE CHANNEL
TWITTER PROFILE








SETTLEMENTS:
(Well, imagine something like Civilization's  settlements).

Settlements are the place to gather resources (food, water, scraps and a lot more), recruit units and construct buildings.
Also, every settlement has a meme pool which is used to calculate modifiers for recruiting, construction and efficiency.






MEME POOLS:

The game introduces the concept of meme (as in Richard Dawkins theory) which in practice behaves as modifiers.
They live in meme pools and help/destroy each other for influence in a population (both settlements and units have pools).
Some example of memes are: literacy, faith, truculence and labor.
The summation of the modifiers provide by each meme in a pool results in the set of modifiers for that population.
Memes spreads from contact between units and settlements making populations learning new ideas.
In short, memes are "contagious" modifiers. You can inject memes into your city constructing buildings there.


The Memeverse: tool used to configure memes and their modifiers.
The distance between them indicates how they interact. Memes next to each other will have a constructive relation when in the same pool.



CITY BUILDING:

Buildings have several functions in the game. Here are some of them:
* Inject a meme into a settlement pool gradually;
* Allow the player to recruit specific units;
* Change/improve the supply chain of the settlement;
* Unlock special popups with information and reports.




UNIT CONTROL:

Units are semi-autonomous groups of people. The mechanics is inspired by the Close Combat series.
Every unit has it own meme pool which is a copy of the pool from the settlement where the unit was recruited.
You can give orders to your units like: move, attack, work, explore, etc.
All units have a will-to-fight meter that shows how the unit is handling the current situation and if it is about to break and retreat.
When a unit retreats you lose control of it until the will to fight is restored.






DIPLOMACY:

The diplomacy system allows you to interact with other players. You can declare war, make peace, trade resources and embargo someone.
All other players are controlled by AI. The game won't support multiplayer.




DOWNLOADABLE DEMO:

King Of The Settlement is a kind of a demo (vertical slice would be better I guess) of the All Too Human project.
It has only the unit control part. All the rest (like memes, city management and etc) are not there.
The demo starts and gives 3 units to you and 3 to the AI. Your objective is quite simple, beat the AI and win the match.
The goal of this demo is to validate the unit control mechanics (which is complicated, sensible and demand a lot of effort).
If you are interested consider downloading the demo and give us your feedback.
Right now we are working on the project to enter in alpha stage in a near-ish future.

Note: all sounds, musics and some 3D assets are free content and I don't own them. They'll be replaced.

DOWNLOAD THE VERTICAL SLICE (DEMO) FOR FREE!




THE FUTURE:

The future is a bit obscure. One thing only is certain: this game will be finished and shipped.
My next goal now is close the alpha version and release it.
After that we are going to the beta stage, which is launching the game on Steam's early access.
And then, finally, the full release takes place when the game leaves the early access phase.



« Last Edit: July 08, 2020, 10:48:39 AM by Disturbed Coder » Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #1 on: October 24, 2018, 07:14:04 AM »

Hey, Lucas here.
The behaviour of the units is driven by two different attributes: expertise and discipline.


Expertise measures how prepared the unit is to do what’s supposed to do. It includes working, fighting and exploring.
For example, in combat a unit with high expertise takes less time to reload, less time to shoot and have increased chances to hit the target.

Discipline measures how solid the unit is. High discipline makes the humans, which compose the unit, fight and move (as you can see in the GIF) in a more ordered fashion.
Also, it defines how long a unit can take fire before breaking and entering retreat mode (where the player/AI can’t control the unit temporarily).


Ultimately, both attributes are defined by the memes living in the pool of the unit (which will be better explained in a future post).
In short, each meme modifies the discipline and the expertise of the host unit. Thus, the final values are the summations of these modifiers for all memes in the pool.
For instance: memes like sloth, corruption and dread affects the attributes mostly negatively.
While in other hand, militarism and competitiveness will affect in a positive manner.
Logged
fearless_donut
Level 0
***


View Profile
« Reply #2 on: October 24, 2018, 10:15:57 AM »

Quote
It’s a mix of Civilization, Close Combat and Constructor
That's strong Smiley

Quote
but I’ve passed the point of no return
We are all here paving our way into gaming valhalla. Gentleman

The memes idea looks interesting. I'd like to see where it goes. Though i'm not sure how to play this game from just seeing the screenshots. Will there be direct control over units? What's the goal of a level - to survive yourself or to destroy opponents?


Logged

My devlog - Aether Way
And Twitter
Devilkay
Level 2
**

Hi! First game-dev experience!


View Profile
« Reply #3 on: October 25, 2018, 06:14:13 AM »

empty spaces...
Logged
mediocrityoverlord
TIGBaby
*


View Profile
« Reply #4 on: October 25, 2018, 04:22:43 PM »

HELLO INTERNET,

I'm the guy who's supposed to make this game look good.
Lately we've decided to actually show the player memes and their relations through a screen called the MEMEVERSE.

It is possibly the most important screen in the game, as it serves as a representation of an agglomerate's field of ideas. Be it an unit, a trade caravan, a city or a player (the player being the conjunction of everything in his control). Memes will interact with each other based on their position on the Memeverse. Far apart memes will increase tension in that pool and they will fight each other off, unless there's constant reinforcement of both ideas. This system is always trying to reach a state of balance, and the player will mold his civilization's behaviour by reinforcing specific ideas that suit his strategy.

A unit's pool of memes is called a... meme pool. Meme pools will interact with each other based on how approximate they are with one another, and pools independent of player will assimilate. This interaction can be used for good or for bad. It can serve as a pre-attack, or buffing an ally's capacity to do something, as the tension created of different ideas being inserted into a pool will reduce its ability to function.


(The memes in this gif are placeholders, obviously)

This graph is a shader I wrote and nodes are good ol' UI stuff.

Code:
			/* sz = circle size, lsz = line segment size, 
t = distance from center, a = angle,
t = thickness, f = wave frequency,
a = wave amplitude, tm = time multiplier */
float renderCircle(float sz, float lsz, float l, float a, float t, float f, float amp, float tm) {
float lc = l + ( cos(a*f*0.5) * amp ) + ( cos(_Time.y + a*f) * amp );
float c = round(((cos(-_Time.y*3.0 + a*lsz)+1.0)/2.0)) * step(lc, sz) - step(lc, sz - t);
return c;
}

float renderCircles(fixed2 uv) {
uv -= _SelectedMemePos;
float l = distance(uv, fixed2(0.0, 0.0));
float a = atan2(uv.y, uv.x);
float t = 0.004;

float c1 = renderCircle(0.1, 50.0, l, a, t, 5.0, 0.005, 1.0);
float c2 = renderCircle(0.5, 100.0, l, a, t, 10.0, 0.02, 2.0);
float c3 = renderCircle(0.9, 200.0, l, a, t, 20.0, 0.05, 3.0);

return max(c1, max(c2, c3));
}


fixed4 frag (v2f i) : SV_Target
{
// sample the texture
fixed2 uv = i.uv;
uv -= 0.5;
uv *= 2.0;
uv -= _PanPosition;

fixed4 col = fixed4(0.0f, 0.0f, 0.0, 1.0f);

fixed2 z = step(fixed2(0.98, 0.98),  frac(uv*5.0));
     float t = max(z.x, z.y);
col = fixed4(t, t, t, 0.0f);
col = lerp(_GCA, _GCB, t);

float circles = renderCircles(uv);
float d = distance(uv, fixed2(0.0, 0.0));
fixed4 clrCircles = fixed4(lerp(fixed3(0.0, .1, 0.0), fixed3(.1, 0.0, 0.0), d) * circles, 1.0);

return col;
}
« Last Edit: October 31, 2018, 11:57:03 AM by mediocrityoverlord » Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #5 on: July 26, 2019, 07:19:48 AM »

Vertical slice available for download!
Check our itch.io page


King of the Settlement is a vertical slice of the project All Too Human.
It features the unit control part of the project only (the city building and memetics stuff are not there).
The match starts and gives 3 units to you and 3 to the AI. Your objective is quite simple, beat the AI and win the match.
The goal of this demo is to validate the unit control mechanics (which is very complex).

Note: all sounds, musics and some 3D assets are free content and I don't own them. They'll be replaced.



Download King of the Settlement for free at itch.io

And don't forget to leave your feedback!! Smiley
« Last Edit: July 26, 2019, 12:28:43 PM by Disturbed Coder » Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #6 on: August 09, 2019, 11:06:45 AM »

All Too Human units system was inspired by Close Combat Series (a WWII themed RTS game).
Instead of controlling each person individually you control squads.
Each squad has a certain degree of autonomy. They will fight, seek cover and retreat when necessary.
The goal of this implementation is to avoid micromanagement.
Besides the units part, All Too Human has a city building/management system which will also demand some attention from the player.


The keystone of the game design is to be as realistic as possible (without being so boring).
Units behave (as far as possible) as humans. They won't fight to death when outnumbered. They prioritize their own lives against your orders.
In history, many battle were won because the winner convinced the adversary to flee, they didn't have to kill every last one of them.
That's why the Will-to-Fight it's a important concept in the game, because it measures how the unit is willing to follow your orders.


DOWNLOAD THE VERTICAL SLICE



HUD



1: Player Flag: Each player is represented by a unique flag. The flags are generated procedurally for each map (soon I'll post here about procedural flags);
2: Unit Type: The X symbol denotes that's a infantry squad.
3: Current Action: The sideway hourglass indicates the squad is idle. Possible other actions are move, retreat, fight, work and explore;
4: Life Meter: Shows how many members of the squad are alive. When this bar is empty the unit is destroyed;
5: Will-to-Fight Meter: Shows the willing to fight of the unit. This bar decreases when a member dies or when lots of bullets are flying around. When this bar is empty the unit retreats and the player lose control of it.




MOVEMENT


Squads can move on foot or using cars. In the game a car is a resources that need to be gathered (or manufactured) to be used.
However in the vertical slice King of the Settlement all units always start the match with cars.
After stop moving, the unit will arrange itself around the point your ordered them to go, seeking the places with the best cover to stay.



Even having a car, if you order them to move a short distance they will do it on foot.



COMBAT


The combat system, like the rest of the game, was designed to be as realistic as possible.
Projectiles are physical entities in the world (instead of just a hitscan) and their velocity is based on real life guns.
Bullets ricochet on the terrain, buildings and cars.






RETREAT


Squad retreating after taking heavy fire.



VULTURES


Vultures will spawn over dead bodies and will stay there for a few days.



PLAY THE VERTICAL SLICE

Download the vertical slice King of the Settlement and check the unit control mechanics.
Feel free to leave your feedback and comment.
Thank you!!

KING OF THE SETTLEMENT AT ITCH.IO
Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #7 on: August 16, 2019, 11:25:44 AM »

PROCEDURAL FLAGS

All Too Human is a full procedural game. Every match is created based on a random seed, a signed integer number ranging between 0 and 2.147.483.647.
Every time you play the same seed the same world will be created.
The game was designed to support up to 16 players.


A problem that appeared when dealing with lots of players was how to visually identify every player.
My first implementation was to assign 16 different colors, one for each player in the game (RTS games like Starcraft and Warcraft use that approach).
However I found myself spending hours trying to properly configure 16 "unique" colors.
That was hard.


Then the idea of procedural flags came to me. I love how Hearts of Iron shows the flags of the units.
Besides, flags do follow some explicit patterns. After a small research I could create a simple algorithm to generate as many flags as I needed.




COLORS AND STYLES

First of all is the ratio of the flags. In general they use 3:5 so I adopted that for the game.
The next step is the colors. If you check carefully you'll notice that a small set of colors are used for the most flags.
(This article was very helpful to define which colors to use: https://en.wikipedia.org/wiki/List_of_flags_by_color_combination)
Thus, using the correct ratio and recurrent colors the game would be able to create many real-world-like flags (of course, there's always exceptions like Nepal).



The flag factory uses 10 colors. For each flag 3 colors are chosen (but depending on the style only 2 will be used).
Also, it avoids creating similar flags and single-colored flags.



Each world seed will result in a different offset for the HSV color of the flags.
Doing this we make the tones of the colors slightly different for each seed.



Currently the flag factory can create 8 different styles of flags.



SHADING AND STORAGE


With the color and style chosen, the next step is applying a cloth texture over the flag to look a bit more realistic.


The Flag Factory is a system that uses a shader to draw the flags and a component that renders the flags to textures during the startup of the game.
As soon as the game is loaded the factory is destroyed and all generated flags for that world are stored.



Unity3D tool to visualize all flags generated for the current world seed.



Thanks for reading!
Please, consider downloading the vertical slice of the game at itch.io.

Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #8 on: September 10, 2019, 07:52:48 AM »

PROCEDURAL WORLD CREATION

All Too Human is a real time strategy game with memes.
The worlds were designed to be huge desert wastelands.
They are created procedurally based on a seed and some other configuration properties.
The algorithm behind the mesh creation uses Perlin Noise plus a "tectonic mountains" generator.


The world is populated with settlements and landmarks (the exact number depends on the size of the map).
Settlements are controlled by players (one human and rest AI). They are used to recruit units, construct buildings and more.
Landmarks are neutral places in the world. They cannot be owned by players. Players can explore landmarks (to gather resources, population and even to gain access to a meme).
Units inside landmarks have a cover bonus making them a good outpost or a defensive position.


Currently, there are 4 worlds sizes:
* Duel: 15km x 15km / 9,3mi x 9,3mi / 2 settlements;
* Standard: 25km x 25km / 15,5mi x 15,5mi / 4 settlements and 4 landmarks;
* Large: 35km x 35km / 21,7mi x 21,7mi / 9 settlements and 9 landmarks; and
* Huge: 45km x 45km / 28mi x 28mi / 16 settlements and 16 landmarks.



The WorldProfile is used to configure the world creator algorithm. Every world attribute can be configured here (like size, mountains, sun light color, sky color and so on).


WorldProxy is the system responsible for running the world creation.



Every time you play the game using the same seed the exact same world will be created (with the same settlements, landmarks and even meme pools).
The whole mechanics of the game orbits around settlements. They define how many units you can have and what places of the world you have access.



Worlds #0 to #19 - Standard map size (25km x 25km / 15,5mi x 15,5mi)


Currently landmarks are free 3D objects. This will be changed in the future.


Settlements are owned by players. They can be sacked and occupied.




When the population of a settlements increases new houses will be automatically constructed.





Logged
Skaggsoft
Level 0
**


View Profile WWW
« Reply #9 on: September 10, 2019, 12:37:48 PM »

This looks really great!

It was particularly interesting to see how you were doing the flags.

Thanks for putting so much effort into these posts.
Logged

Disturbed Coder
Level 0
**



View Profile WWW
« Reply #10 on: September 10, 2019, 12:56:26 PM »

Thank you very much!
I appreciate your feedback Smiley
Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #11 on: July 08, 2020, 06:45:26 AM »

MEMETICS


More than a decade ago I first came across the concept of a meme.
For me, a software engineer since always, it sounded like an elegant solution for how humans learn and transfer information.
The idea was coined by Richard Dawkins and until this day is still considered a prototheory or even a pseudosicence by some.


From Wikipedia's article:
"Memetics is the study of information and culture based on an analogy with Darwinian evolution."


Memes are pieces of information that we (humans) use to accomplish something. They can be copied or taught to someone.

I'm a fan of RTS games (must say here that I don't like the expression Real Time Strategy tough).
Again, as a software engineer, I was always into building systems, even when I was playing games.
Some of my deepest influences are Close Combat, Civilization, Space Empires, Sim City, Total War, Mount & Blade and Hearts of Iron.


Thus, I wanted to create a RTS game using a memetic system to define the nuances between the different in-game factions.
I mean, a game like Civilization spans more than 6.000 years of history. But the modifiers for each civilization won't change during the game.
(Well to be fair you can gain new modifiers. But the civ don't adapt to the environment surrounding it. It just responds to the player's orders).


Then the initial concept for All Too Human was born:
It's a RTS game where the modifiers are gained via repetitive actions.
In other words, your faction will change according to the actions they perform most.


Highlighted in red: settlement meme pool and progress to the next meme spawn.

Example 1:
Your settlement is recurrently starving.
It'll trigger the "starvation" finality in the settlement meme pool very often.
And then, after some time, the settlement will learn a new meme providing it a unique modifier based on the past experience.
Some starvation memes are:
- Degenerate Starvation (aka canibalism): reduces the food consumption of the settlement population.
- Bellicose Starvation: increases the truculence of the settlement population.
- Bonviveur Starvation: reduces the discipline of the settlement population.


Example 2:
Your unit is recurrently short on ammo.
It'll trigger the "ammo dearth" finality in the unit meme pool.
Some ammo dearth memes are:
- Bellicose Ammo Dearth: reduces the ammo usage of the unit.
- Degenerate Ammo Dearth: increases the truculence of unit, thus making it more efficient in hand to hand combat.




DEFINING A MEME


If you already read a bit about memetics you probably know that the current scenario is a total mess.
There's no unified mathematic model. And even worse, each author defines a meme in a different way.
Since I didn't have tools to navigate through the problem, I had to came up with something that resembles a meme and would be easy to implement in the game.


The meme is a structure encompassing three distinct values:
1) Finality: the actions that triggers the meme (like starvation, ammo dearth, food dearth, labour, recruitment and so on);
2) Flavour: defines the approach of the meme. Currently there are five flavours: Bellicose, Industrious, Spiritual, Bonviveur and Degenerate;
3) Modifiers: modifiers gained by the population when hosting the meme.


The finality is the link between the gameplay and the memetics system. It's a gateway used all across the game code to notify meme pools about the actions of their host populations.
When triggered very often a finality may spawn a new meme.


Defining memes by flavour, finality and modifiers.
I can't stand this spreadsheet. It must change. Seriously.

List of modifiers:
(Modifiers values range from -1 to 1. Average value is 0. Every meme can either increase or decrease some modifier)

For settlements & units:
- Consumption: food and water consumption per day.
- Labour: labour efficiency (applied for resource gathering and buildings).
- Drugs: drugs usage (drugs reduce the tension but have collateral effects).
- Tension: tension damping.

For settlements only:
- Growth: daily population growth.
- Efficiency: buildings work efficiency.
- Construction: buildings construction ability.
- Recruitment: unit recruitment.

For units only:
- Discipline: how hard the unit is willing to fight under fire before retreating.
- Expertise: ability to use its equipment - affects aiming, reloading and decay.
- Truculence: melee combat effectiveness and defines how likely the unit is to spontaneously attack a unit with a different meme pool.
- Trade: affects trade capacity.




MEMETIC DYNAMICS

The design of the game is about changes on groups of humans. This is what I call memetic dynamics.
There are some ways to modify the current state of a meme pool, here's some:

1) Meme spawning via repetitive action: the scenario discussed so far in this text.
Every group of humans spawn new memes periodically.
The finality of the new meme is selected by a weighted random algorithm which considers the most triggered finalities.
And the flavour is, again, a weighted random selection but this time using the flavours already hosted in the group's pool.

2) Contact with other groups: proximity makes the pool of one group modify the other pool (and vice versa).
Groups of humans can learn from other groups of humans. Moving a unit to a settlement will make their meme pools interact every day.

3) Settlement buildings: some buildings have the ability to "inject" a meme into the pool in a daily basis.
Buildings are the most prominent tool the player have to shape their meme pools (as far as the chaotic nature of the game allows).

4) Events: pretty much like Europa Universalis 4, the player can handle an event via multiple options.
Each option will have a different impact, including sudden meme pool changes.


Meme Pool Unity3D Monitor Tool:
1) Influence accumulated / influence needed to the next meme spawn.
2) Stacked influences so far. This list will define the finality of the newly spawned meme.



CONCLUSION

The whole thing with the memetics system is make settlements and units change in a coherent way.
After all, the name of the game (so far) is All Too Human. Every game mechanic is, in some level, derived from real world empirical observation.

In the current state the system is quite hardcoded. Every meme needs to be defined explicitly in the memeverse spreadsheet.
For the future I'll try a procedural approach. Making memes different according to who spawned them (a bit like Diablo items, if that makes any sense).

Next post will be about trade and economics, which encompass goods extraction in the settlements, trade between settlements and memes that
spread along trade routes.
« Last Edit: July 08, 2020, 07:02:16 AM by Disturbed Coder » Logged
bacon
Level 1
*


View Profile
« Reply #12 on: July 08, 2020, 07:33:19 AM »

Really loving some of the Homeworld vibes I'm getting from this (Deserts of Kharak specifically), excited to see where it goes and always happy to see more indie-RTS stuff.

IMO you should lose "Memes" from your pitch though. I totally understand there is a long history and discourse about memetics specifically, but I clicked into this ready to see how cringe it was going to be because the title sounded like a joke, but once I saw what it was I was like OH COOL. You've got some really cool systems here, but seriously consider getting rid of "memes" from your pitch, otherwise people are going to think you've got literaly internet memes as your game.
« Last Edit: July 08, 2020, 02:47:51 PM by bacon » Logged

CANTATA
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #13 on: July 08, 2020, 10:48:25 AM »

Hey! That's a valuable feedback. Thanks Smiley

You have a good point. Maybe I can pitch the game as a "Procedural RTS Game".

And about this confusion with internet memes, during some time I thought I shouldn't use the word "meme" at all in the game to avoid such misconceptions.
Nowadays I consider using it, but I have to communicate to the player in a efficient maner what kind of meme we are talking about here.

See ya!
Logged
bacon
Level 1
*


View Profile
« Reply #14 on: July 08, 2020, 02:49:47 PM »

Hey! That's a valuable feedback. Thanks Smiley

You have a good point. Maybe I can pitch the game as a "Procedural RTS Game".

And about this confusion with internet memes, during some time I thought I shouldn't use the word "meme" at all in the game to avoid such misconceptions.
Nowadays I consider using it, but I have to communicate to the player in a efficient maner what kind of meme we are talking about here.

See ya!

Procedural RTS is definitely stronger, but you do still want something catchy in there! You should also definitely check out Chaotic Era, I think you two are working on similar things and could maybe help each other out!
Logged

CANTATA
Ramos
Level 10
*****



View Profile WWW
« Reply #15 on: July 09, 2020, 12:19:17 AM »

I surely love the RTS design
I also like the minimalistic and simple/clean environment but I think it is a bit extreme, maybe add a bit more variety in building  shapes and maybe some random rockpiles near buildings and a faded road under desert that connects the buildings

Good luck
Logged

Disturbed Coder
Level 0
**



View Profile WWW
« Reply #16 on: July 14, 2020, 06:44:26 AM »

Quote
I surely love the RTS design
I also like the minimalistic and simple/clean environment but I think it is a bit extreme, maybe add a bit more variety in building  shapes and maybe some random rockpiles near buildings and a faded road under desert that connects the buildings

Hey! Thank you for stopping by!
I appreciate your feedback and I totally agree with that.
Actually, currently I'm working on the visuals of the game.
In the next couple of months I plan more appealing graphics.
Again, thank you very much Smiley
Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #17 on: July 14, 2020, 06:49:55 AM »

Quote
Procedural RTS is definitely stronger, but you do still want something catchy in there! You should also definitely check out Chaotic Era, I think you two are working on similar things and could maybe help each other out!

Thank you very much for your time and thoughts!
I do appreciate that.
Logged
Disturbed Coder
Level 0
**



View Profile WWW
« Reply #18 on: March 20, 2021, 12:30:58 PM »

GRAPHICS OVERHAUL


Postponed economics post because I had a great breakthrough in the project in the past few months.
In the future I'll write about economics and settlement mechanics as promised.





Graphics refactoring motivation


As I always say, I'm a systems programmer. Graphics never were the priority during the development.
But now I reached a stage in the project where I need something more visually appealing.
All systems implemented so far aren't "social-media-friendly" in a sense that it's hard to tweet about the memetic system, for example.
Usually it demands more information (than a couple of images and a 240 characters) to clarify what the system is doing.
Thus, I started studying PBR shaders and how I could adapt that to the game.






Sky color and beam of light

In the previous version, the color configuration of the game was way too complicated.
I had to define the Diffuse, Specular and Ambient components for three different moments (day, sunset/sunrise and night).
Total of nine different colors. That was a complete nightmare.
So, once again I used the real world as reference to simplify how the game engine handle natural colors.


WorldProfile: the new version has only one input color: the sky color.

A bit of physics:
The color of the Sun is white.
When it enters Earth's atmosfere the blue component scatters across the sky.
The rest of the light forms a yellow beam which travels to the earth surface (and finally being reflect or absorbed).


Based on that I made the game world configurable with one single color: the sky color.
The beam color is calculated as follow:


beamColor = white - skyColor

And to achieve a bit of variation, for each world seed the sky color hue will be slightly different (which in consequence affects the beam color and also the ambient color system).





Terrain

Lots of improvements in the terrain. The shaders I was using were so old that I can't remember when I wrote them.
First step was using normal maps which made a lot easier create real-looking sand and deserts.
Next, after researching a bit in the internet I was able to assemble my own PBR shader which also greatly improved the terrain appearance.



Another nice addition was the implementation of terrain patterns.
Two distinct material properties are set for the terrain shader: sand and rock material.

The rock is visible in angled terrains and flat plains will be made of sand in general.
In fact, the steepness of the terrain defines how rocky it is.

And finally, the most difficult adventure was learn how to mix normals without messing them.
(I found this article that was really helpful: https://blog.selfshadow.com/publications/blending-in-detail/)





Skybox

Reworked the skybox to feature clouds and reflect the current weather.
Clouds are drawn using a noise image plus a simple raytracing algorithm. Which also is used to calc clouds shadows projection over the terrain.






Props

A windy settlement.


Houses construction algorithm in action.


Abandoned wind farm.




Implemented a new algorithm (named Cluster Algorithm) to setup procedural props.
Now, the settlements will be more densily populated with houses and other objects.
Also, I've implemented roads and walls/fences.


Now the objects are placed more organically.

In the shader side, implemented two FXs:
Sand up mask and Ground contact.
Now the objects "feel" like they are physically in the terrain.


Ground contact shader FX.

Toggling on/off UpMask and GroundContact FXs.




Next step

Next step is a overhaul in the units and combat systems.
I'll rework both the graphics and the internal systems.
Regarding graphics, I'm buying some animated 3D models to use in the game.
My goal is keep improving the game visually and soon I'll work on a vertical slice which I plan releasing for download.

Thank you for reaching this far!
If you are interested please follow me on twitter: https://twitter.com/lucas_ot
Or you can follow the game account and avoid my evetual sh*tposting: https://twitter.com/alltoohumangame

See you next time!


« Last Edit: March 20, 2021, 12:42:12 PM by Disturbed Coder » Logged
vivaladav
Level 1
*



View Profile WWW
« Reply #19 on: March 21, 2021, 04:29:02 PM »

Hey, what happened to this project in the last 2 years?
I wanted to try your build on itch.io, but it seems your latest update is from Aug 2019.
Logged

Creating "Virtueror, the virtual conqueror" (RTS + 4x + RPG)

[Wishlist on Steam]
[TIGS devlog][YouTube devlog][website]
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic