Monthly Archives: January 2017

Progress Update 6

I’ve mainly doing core engine work, putting in time to lay decent groundwork for features in the future.

Entity Component System
I’ve started building an ECS, specifically to manage the large amount of game units. The technical design of the game units would indeed fit in a deep class hierarchy, however I don’t believe this system will give me the flexibility or speed that I need. I took a glance at different c++ ECS libraries like EntityX, but none seem to be in active development so thats why I’m rolling my own.

Construction Grid
When the player hovers over the landscape in construction mode a grid indicating the underlying tiles now shows. This is simply done in shader.

Screenshot_Thu_Jan_12_20_26_27_2017.png

Construction grid covering the whole landscape

Screenshot_Wed_Jan_11_19_25_14_2017.png

A grid surrounds the players mouse

Voxels
Started experimenting with Polyvox, a c++ voxel libary. For sake of dev time, I would much rather use an established lib than roll my own solution. Thinking of using this for storing and meshing the user constructed buildings that sit upon the terrain.

screenshot_tue_jan_10_10_52_33_2017

Voxel sphere in a 128×128 chunk

LOD Texturing and Ocean Texturing
When zoomed out the engine is displaying the lowest LOD world map, previously you would only see a flat green across the whole landscape. Now the system generates a texture that shows the different tile types and changes in biome (Currently only the  grass/sand) and places it on the mesh. The texture is generated at the start of the game so is not dynamic yet. Later I will implement a system to make it possible to update the texture mid game, to show the change in seasons for example.

Screenshot_Thu_Jan__5_21_11_43_2017.png

Areas inland which are below sea level currently get treated as ocean, will be fixed later.

There is also a similar technique for the ocean, at the start of game a texture is generated from the height map data. I then plug this into the ocean shader to create lighter values near the landmass.

Low Resolution Rendering

I did some experimenting with low resolution rendering of the game. Essentially I rendered the the scene to a texture and half or quarter resolution then scaled it back up to full size using nearest neighbour filtering.

The results look pretty cool. At the lower levels of  resolution the graphics become somewhat abstracted, a representation of the object rather than an attempt at fully realising it. The greater the abstraction, the more that is left to the mind to fill in. Go really far with this and you end up in the realm of dwarf fortress.

Halving a resolution like this also has an added performance advantage. Half the amount of fragments are being pushed through shaders and textures can be of lower res.

screenshot_mon_jan__2_02_49_46_2017screenshot_mon_jan__2_02_49_54_2017screenshot_mon_jan__2_02_50_13_2017screenshot_mon_jan__2_02_50_30_2017screenshot_mon_jan__2_02_51_35_2017screenshot_mon_jan__2_02_52_04_2017
Screenshot_Fri_Jan__6_12_58_25_2017.png

Progress Update 5

Art direction
Ive been playing around with the terrain shaders. I imagined the game having some form of pixel art, but still being a fully 3D world. Up until this point I’ve just been running generic default shaders with a sprite map from ripped from Minecraft. When I get round to creating the art assets for trees, players etc then I will settle on a more concrete style, but thats later in development.

screenshot_mon_jan__2_17_02_53_2017

Test scene with new shaders

Screenshot_Mon_Jan__2_17_36_12_2017.png

Screenshot_Mon_Jan__2_17_40_30_2017.png

screenshot_mon_jan__2_15_27_59_2017

Rendered with 5 colours as opposed to 10 in the others

Below are 2 screenshots where I have rendered the scene at half resolution and then scaled it back to full res after. The effect is that a single pixel is now double size. Pretty cool, gives a neat low res look, but doesn’t really make the scene any more readable.

screenshot_mon_jan__2_00_25_12_2017

screenshot_mon_jan__2_00_58_04_2017

Terrain Level Of Detail
I want the player to be able to zoom out of the world at get a look at the whole landscape. It’s  important to the gameplay that the player be aware of the goings on in the surrounding area. Say, if an army is approaching or a village is being raided nearby. At the furthest out zoom level entities within the world will be represented as icons.

screenshot_wed_jan__4_20_11_36_2017

Here you can see some billboarded saplings.

screenshot_wed_jan__4_20_11_48_2017

The visible seams between LOD levels needs to fixed with a transition.

Screenshot_Wed_Jan__4_20_15_09_2017.png

The lowest LOD only uses the grass tile at the moment, that’s why beaches cant be seen.

 

Other:
– Added button to switch to dev camera from within game
– Added an simple ocean shader with faux waves
– Progress made on billboarded grass and trees
– Wrote shaders for different terrain LOD’s