RTS4 Update 4

I had to move house so had less time to code, but this month I focused on bug fixing, cleaning up the code, and improving the visuals. I’ve also switched to my own pathfinding solution which can (most of the time) avoid the grid zig-zag effect with very little extra cost, but it’s incomplete and can break in situations (when more than 1 unit tries to use the same navigation result).

RTS4 Update 4; new building models, procedural foliage

The terrain supports cliffs and will cut the mesh (using a geometry shader) and insert cliff geometry to fill the gaps. A compute shader procedurally places foliage instances based on the terrain type. I bought the Toony Tiny RTS Set and switched the buildings out, they overlap with the AOM buildings surprisingly well except that the Town Centre is actually a blacksmith and many of them are too tall. (Note: These will be replaced with something less cartoony eventually)

I’ve more closely replicated the AOM camera angle, but after seeing the AOE4 gameplay trailer, I’d like to try a wider FOV.

Standard RTS Camera FOV (15° FOV 125m distance)

I was hoping to get a public WebGL build up, but many of the recent changes have made the game incompatible with WebGL, so I’ll need to disable them or build fallbacks first.

5 thoughts on “RTS4 Update 4

  1. Hello! Your blog is very interesting! You’ve made a great job. Do you allow to use some of your code on other projects?

      • Thank you very much Weesals! I will be glad to share my project with you. But I think it needs a few month of work before that.

    • Thanks! They are models. The random map scripts output a cliff edge mask, which is used to generate line segments, then mesh instances are rendered along those with a vertex shader to fit meshes to the line segments (each mesh spans 4 terrain cells). The terrain has a geometry shader which cuts the terrain where cliffs should be, to avoid terrain clipping into cliff geometry.

      Triplanar with tessellation and displacement would probably be easier and look nicer though. I’d like to try it now that WebGPU is maturing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s