Kingdom Wars

Features

  • Procedural terrain generation with different map sizes
  • Exploration and colonization of settlements
  • Construction, resource management, economy
  • Territories divided in regions and provinces
  • Unit recruitment, experience and upgrades, unique upgrade tree per faction
  • Battles and sieges
  • Technology tree, unique per faction
  • Diplomacy, with diverse factors affecting the political relations
  • Goal Oriented Action Planning model for AI actions
  • Mission generator with rewards
  • Periodical invasions of hostile armies
  • 7 factions, 21 characters total

Features deep dive, tools & demos

Terrain Generation

Layering noise to create elevation data, then using latitude, humidity and temperature to generate different biomes. Finally creating terrain mesh with different levels of detail.

Tree Mesh Builder

A tool to create procedural tree meshes from trunk, branches and foliage parameters.

Tree Texture Builder

A tool to create procedural textures for the trees foliage and bark.

GPU Driven Vegetation (From 1.1)

GPU driven vegetation system using compute shaders and indirect drawing.

Rope Generator

Dynamically generates rope for artillery mechanisms.

FacileUI

A library to animate and control UI elements.

Unit Tree React App

Interactive web tool for Kingdom Wars wiki, that shows the unit upgrade tree for the playable factions of the game. Developed in React.

Tech Tree React App

Interactive web tool for Kingdom Wars wiki, that shows the technology tree for the playable factions of the game. Developed in React.

Grass Geometry Shader (1.0)

A geometry shader to generate and render grass on the terrain using HLSL. Migrated to compute shader on 1.1

MagmaGX

A custom rendering engine built in C++ using Vulkan as Graphics API, designed and focused on modern GPU-driven rendering techniques.

Key Features

RenderGraph

  • Automatic resource transitions (barriers)
  • Support for textures and buffers
  • MIP/Layer support for textures
  • Multi-pass rendering pipeline

GPU-Driven Rendering

  • Indirect drawing
  • Compute-based frustum culling
  • Compute-based occlusion culling using Hi-Z
  • Instance buffer compaction for contiguous memory access
  • Material batching for reduced draw calls

Physically Based Rendering (PBR)

  • Cook-Torrance BRDF
  • Albedo, Normal, ORM and Emissive textures
  • Image-Based Lighting (IBL)
    • Irradiance map precalculated from Skybox with compute shader
    • Prefiltered color map precalculated from Skybox with compute shader
    • Precalculated BRDF LUT texture with compute shader

GPU-Driven Simulation

  • Kinematics: linear & angular acceleration & velocity
  • Particles: velocity and size over time
  • Boids: Craig Reynolds steering (Separation, Alignment & Cohesion)

Architecture

Pipeline

Frame Lifecycle

Demos

PBR Materials

Demonstration of different PBR materials.

Kinematics + Particles

Kinematic spheres leaving a trace of particles.

Flocking

Paper planes showing flocking behavior.

Other Projects

Retro Music Box

Arduino device to play melodies controlled by Android App via bluetooth.

Training App

Android App to track strength training sessions and upload to Google Sheets.

Devastator Kontakt Instrument

Sample instruments for Kontakt. Developed with Lua and Kontakt Script Processor.