Operation: New Terra
In development
Real-time rendering for procedurally generated environments
Operation: New Terra is a single-player bullet-hell roguelike developed by a six-person team using a custom C++ and OpenGL engine. I designed and implemented the rendering system, contributed to the engine architecture, and developed NPC behaviour trees and the boss encounter.
- Primary role
- Engine development and rendering
- Project type
- Team project
- Technologies
- C++17
- OpenGL 3.3
- GLSL
- ECS

Engine architecture
The engine uses an entity-component-system architecture with packed component storage and a fixed 60 Hz simulation. The renderer consumes entity state from the shared registry, interpolating transforms between simulation steps and translating gameplay events into visual effects.
Planar simulation · fixed 60 Hz tick
Input, movement and combat
Motion and hit effects
Packed storage by component type · motion, render data and effects
3D presentation · per frame
Registry state
Visual system events
Entity position and angle · camera follows interpolated player position
Particles, trails and ripples
Meshes, materials and forward passes
Rendering pipeline
We built a multipass forward rendering pipeline to support procedurally generated environments, dynamic lighting and large numbers of instanced objects. The pipeline combines shadow maps, world-space effect textures, planar reflections and atmospheric scattering within an HDR rendering workflow.
- Directional shadows
Shadow depth and grass visibility
- World-space fields
Local light, interaction, ripples and trails
- Planar reflection
Mirrored HDR when water is visible
Inputs
- Pass 1–2Shadows and light fields
- Forward HDR and resolve
4× MSAA resolves to HDR colour and depth
Inputs
- Pass 1–2Shadows and fields
- Pass 3Reflection
- Atmospheric scattering
Half-resolution scattering and fog opacity
Inputs
- Pass 4Resolved depth
- Atmospheric particles
Motes and fireflies blend into resolved HDR
Inputs
- Pass 4Resolved HDR and depth
- Pass 5Fog opacity for motes
- Bright extraction and bloom
Soft threshold and four blurred scales
Inputs
- Pass 6HDR with particles
- Final composition
Composite, tone map and grade
Inputs
- Pass 5Scattering and fog
- Pass 6HDR with particles
- Pass 7Combined bloom
Procedural environments
The generated room and corridor layout provides a shared spatial representation for gameplay and rendering.

Grassland and Snowfield share a procedural river descriptor. Flooded Ruins turns the same walkable footprint into raised geometry.
View full resolutionWe integrate these bounds with player movement constraints, while the renderer uses the same information to construct biome-specific environments.
Instanced environmental geometry
Vegetation follows the Grassland riverbank, and stepped platforms define the walkable geometry in Flooded Ruins.
Grassland riverbank


The two views share the same camera, terrain and lighting.
Procedural vegetation
Vegetation is generated in deterministic world-space chunks using jittered grid placement. Terrain and river conditions control blade density and height. A padded region around the camera target limits the resident chunks, while budgeted generation and uploads distribute preparation work across frames.
Each chunk draws a shared blade mesh using compact per-instance attributes. Wind and surface interaction deform the blades in the vertex shader.
for each queued chunk within frame budget:
candidates = generateJitteredGrid(chunk)
instances = applyTerrainAndRiverRules(candidates)
uploadToReusableBufferRange(instances)
for each resident chunk:
drawInstanced(sharedBladeMesh, chunk.instances)Instanced platforms
Flooded Ruins generates stepped base blocks and smaller raised overlay plates from the walkable room and corridor bounds. Instances are grouped into spatial chunks, with a shared cube mesh and per-instance transforms and material variation. The main and mirrored views reuse the resident instance batches.
Layered world-space noise adds rust, grime, and stains. A per-instance seed varies the fine surface detail.

Room bounds in cyan and corridor bounds in gold.
View full resolution

Environmental motion and interaction
Shared wind field

A shared world-space wind field drives grass bending and mote displacement. A signed wave also modulates grass shading, while baseline flutter and drift continue between gusts.



Surface interaction
Player movement writes into persistent world-space textures sampled by terrain and vegetation shaders.

Trail history is reprojected into the current mapped region, decayed and combined with new movement stamps. A separate ripple field generates expanding waves at water contact.
Both panels share the same world-space framing. The dashed line marks the edge of water contact, and the packed trail core drives the track visible on the snow.


Water and atmosphere
Reflections and shafts of scattered sunlight shape the Flooded Ruins scene.
Flooded Ruins light shafts


The disabled state removes shaft scattering and shaft-specific fog modulation while retaining ordinary fog and surface lighting.
Planar reflections
Grassland and Snowfield use a procedural river, while Flooded Ruins places a continuous water surface beneath its raised platforms. A mirrored camera renders eligible scene geometry into a half-resolution HDR target. The water shader projects its surface into the reflected view and perturbs the reflection lookup using animated waves and interaction ripples.
Depth-aware light shafts
Atmospheric lighting is evaluated at half resolution along camera rays clipped by scene depth and a bounded height volume. Each sample projects along the light direction into a moving world-space cloud pattern. The integrated visibility is shaped into volumetric shafts, with separate fog opacity and scattering contributions.
Flooded Ruins render targets
Display-mapped intermediate targets from the earlier capture shown alongside its matched final frame.

Matched final · 1280 × 720
View full resolutionDay–night and ambient lighting
A continuous day–night cycle controls directional and ambient lighting, environmental colour, atmospheric parameters and exposure. Emissive vegetation and wind-driven motes add detail at twilight, while pulsing fireflies contribute localized illumination at night.

The lobby from the same camera at four points in the lighting cycle.
View full resolutionFirefly population and illumination
Seeded world-space cells place isolated fireflies and groups. Selected individuals and weighted group centres contribute illumination. Sprites and lights share pulse timing.

Matched overhead views of the Grassland riverbank.
View full resolutionLighting, emission and bloom use stock settings.
- Submitted sprites
- 72
- Individual lights
- 19
- Group lights
- 8
Upper plot
- Slow carrier
- Faster flicker
Lower plot
- Selected sprite and light
- Second sprite in group
- Map capture at 3.833 s
World-space lighting and HDR
Projectile volleys and fireflies cast local light on the riverbank at night.
Nighttime illumination


The off state disables accumulated projectile and firefly illumination. Projectile emission, visible fireflies, ordinary scene lighting, atmosphere and bloom remain.
Accumulated local illumination
Projectiles and fireflies contribute light through additive stamps into floating-point world-space textures. Surface shaders sample these accumulated fields by world position, illuminating nearby grass, ground, water and meshes independently of the emitters’ visible glow.
Different fields support different material responses. The mesh field also retains height information for an approximate receiver response.
World-space light fields
Display-mapped targets from the enabled state.



HDR and bloom
Emissive geometry and lighting accumulate in an HDR scene buffer. Bright regions are extracted and blurred across four scales before contributing to the final composite, which is mapped into the display range using the Uchimura tone curve.
Display-mapped camera-space targets from the same enabled frame.

Final composite of the enabled frame.
View full resolutionBoss encounter
The boss is implemented as a coordinated multi-entity encounter, with a central core, linked guards and attackers. A state machine manages behaviour transitions, timed skills and formation changes, while parameterized projectile emission produces structured bullet patterns.


Behaviour architecture
Core drift, guard orbit and repositioning attackers
Queue a skill after more than 8 seconds in normal behaviour, with a permanent guard alive and the cooldown clear.
Enter a randomly chosen skill on the next tick, reset weapons and timer, set formation
Execute for 6.5 s
Execute for 5 s
Remove temporary parts and queue normal behaviour with a 4 s cooldown that counts down in normal behaviour
Independent encounter conditions
At or below 50% core health, enter phase two and replenish permanent guards to four
The core can take damage when no permanent guards survive
Projectile generation
Successive volleys rotate their launch directions to form spiral patterns. Individual projectiles travel along straight paths at constant velocity. The apparent curvature emerges from the distribution of projectiles emitted over time.
One projectile over time
Constant velocity · 500 world units/s
Eleven volleys at one instant
Six shots per volley · launch angle turns 4.17° per volley
- Tracked projectile
- Successive shots along one arm
- Other projectiles
Team and credits
Operation: New Terra was developed by shoot shoot shoot studios, with contributions across engine development, rendering, physics, procedural generation, gameplay, NPC systems and user interface development.
- Kehan Hettiarachchi
- Arashveer Singh Garaya
- David Wang
- Randiv Adhihetty
- Ronaldo Kanegae Penha
- Delsther James Edralin
Asset acknowledgments
Game assets from Kenney. The layout diagram uses Inconsolata, designed by Raph Levien and distributed under the SIL Open Font License 1.1.