Kowloon is the working title of a personal project I’ve been developing since 2023/24. Inspired by the dense housing and alleyways of Kowloon Walled City, it's a roguelite shooter taking place in a semi-procedurally generated world.
The goal of this project is not just to release a game, but to serve as a tool for self-improvement and to have the opportunity to work on areas of gamedev I would not usually work on in a normal company setting.
Everything on this page is still very much work in progress.
Gameplay Systems
One of the goals was to familiarize myself with data oriented gameplay systems. For this, all gameplay logic was built within Unity's ECS system.
• Player Controller (input, movement, collision, animation).
• Inventory and item handling.
• Bullet impacts and wall penetration.
• Goal-Oriented Action Planning for behavior AI (work in progress).
Floor Plan Editor
Every building in the game is procedurally assembled out of pre-authored floorplans.
This custom editor handles:
• Editing of walls
• Adding of portals (windows, doors)
• Surface assignments
• Wall and room type assignment
• Automatic room detection and floor creation

Adding walls and assigning materials.

Wall Segments
Each wall consists of individual segments placed between two control points. The wall kit pieces are kept as generic as possible and are deformed in the vertex shader - adjusting length, height, portal width and portal height.
The vertex shader uses bitflags packed into the vertex colors to determine which vertices need to be offset. For example, the door portal needs to move independently from the rest of the wall geometry.
Mean Value Coordinates Deformer
To support the procedural assembly of the pre-authored floorplans, a deformer was implemented to bring both floorplans and assets into the correct shape to match the room layout.
For staircases this means modifying the mesh to match the shape of the room it is placed in. The deformer can run both in HLSL and C#.

A debug visualizer showing the Mean Value Coordinates Deformer in action.

When tagging a room as a staircase, the stairs are matched to the closest available asset and then brought into shape by the deformer.

Control points for the deformer are authored in Maya. Vertex colors control the visibility mask of the stairs when the player enters a new floor.

Shape Analysis
Each building is defined by its exterior footprint shape. To assemble the building, a feature analysis is run on all existing floorplans. 
The shape only needs to loosely fit the target, as it can be adjusted to the correct form using the MVC Deformer.
The same shape matching is also employed to construct staircases and is intended to be used to insert unit floorplans into building levels.

Shapes are first simplified and then run through a feature comparison to find the best fitting shape matching the input.

VFX
The VFX system handles spawning of the correct impact effects for each material type.
Instead of spawning a separate emitter per impact we only have one global emitter active at all times. This emitter reads from a buffer, in which we are setting the spawn positions and impact velocity vectors which have occurred in a frame. This allows spawning a large amount of impacts each frame with negligible performance overhead.
Raytraced Lightmap Baker
As a proof of concept, I implemented a custom raytraced light map baker running in a compute shader - the thought being that lightmaps get cached on level load and then updated on a per room basis when wall segments are being destroyed in the level.
It handles lightmap packing and all raytraced light calculations.​​​​​​​
Back to Top