
// Project
Risky Strats 2
Stats Unavailable
Newly released — stats coming soon!
About this project
A classic yet complex RTS themed ROBLOX game. Expand your empire and eliminate anyone that stands in your way. Become the best of the best and dominate the battlefield. Currently in active development — building out unit AI, multiplayer networking, and base-building systems.
Architecture Overview
Risky Strats 2 runs on a server-authoritative architecture where the server owns all game state and the client is purely presentational. The core game loop ticks at 5 Hz, processing combat, economy, territory, and unit movement every 0.2 seconds across all active nodes simultaneously.
Combat Engine
A tick-based battle resolver that processes simultaneous multi-team engagements across dozens of contested nodes. Each tick batches all active fights, calculates attack/defense per team pair, and resolves outcomes in a single pass. Supports alliance-aware targeting so allied units don't damage each other.
Pathfinding System
A two-phase BFS + Dijkstra hybrid. BFS finds all minimal-hop routes through owned or contested territory, then Dijkstra selects the physically shortest path by stud distance. Routes dynamically recalculate as territory ownership changes mid-game.
Procedural Map Generator
Multi-octave Perlin noise produces organic node clusters on configurable grid sizes (7×7 to 16×16). Circular boundary gradients create natural map edges. A capital placement algorithm scores positions by distance from other capitals with edge preference, ensuring balanced starts for up to 10 teams.
Networking Layer
Server-authoritative with client-side prediction. RemoteEvents carry compressed state deltas rather than full snapshots. The server validates every player action before applying it, preventing exploits. Shared config modules keep server and client logic synchronized.
Economy & Building System
Income ticks generate resources based on owned node count and building upgrades. Players invest in defensive structures, unit production, and base upgrades. The server enforces all resource constraints and build requirements.
Fog of War
Per-team visibility computed from territory ownership and adjacency. A cache invalidation system recalculates visibility only when territory changes hands, using selective partial updates instead of full recomputation each frame.
Team & Diplomacy System
Supports dynamic alliances, betrayals, and team elimination. Alliance state feeds directly into the combat engine's targeting logic and the pathfinding system's territory validation.
Match Lifecycle
Manages the full flow from lobby creation through team selection, countdown, active gameplay, win condition evaluation, and post-match cleanup. Handles player disconnects, rejoins, and team rebalancing gracefully.
Key Features
Base Building
Build on your bases. Upgrade your buildings. And fortify your empire with even more defensive structures.
Pathfinding
An advanced navigation system allowing your units to find the fastest way to any location including the frontlines.
Combat System
Real-time combat across contested nodes. Send your units to the frontlines, overwhelm enemy positions, and defend your territory. Every battle plays out in real time — strategy and positioning determine the outcome.
Unit Management
Gather your troops, manage them accordingly, and allocate them intelligently to certain nodes to make your empire stronger in every aspect.
Multiplayer
Compete head-to-head against other players. Fight the best that's out there to become the best. Form an alliance with others or take them all head on.
Unit AI
Intelligent unit behaviors from an NPC AI. Equipped with advanced decision-making, threat assessment, and extremely dynamic response systems.
Tech Stack
Development Roadmap
Challenges & Solutions
Tick-Based Multi-Team Combat
Processing simultaneous battles across dozens of contested nodes with multiple teams fighting at once, all within a 0.2-second tick loop without lag.
Implemented an efficient tick system that batches all active battles, processes attack/defense calculations simultaneously per team pair, and resolves victories in a single pass per tick.
BFS + Dijkstra Pathfinding Through Contested Territory
Units needed to find paths only through owned or contested territory, not through enemy-held nodes, and when multiple routes had the same number of hops, the system needed to pick the physically shortest one.
Built a two-phase pathfinding system — BFS first finds all routes with the fewest minimap hops through valid territory, then Dijkstra's algorithm selects the shortest by stud distance when multiple routes tie. Routes recalculate dynamically as territory changes hands.
Fog of War Performance
Rendering dynamic visibility for each team — showing owned, adjacent, and contested nodes while hiding enemy territory — without tanking frame rates.
Implemented a cache invalidation system that only recalculates visibility on territory changes, with selective updates instead of full recomputation each frame.
Procedural Map Generation
Generating balanced, organic-looking maps with fair capital placement for up to 10 teams on varying grid sizes (7x7 to 16x16).
Used multi-octave Perlin noise for organic node clustering, circular boundary gradients for natural edges, and a capital placement algorithm that scores distance from other capitals with edge preference.
Economy Balancing Across Variable Team Counts
Income rates, building costs, and unit production had to feel balanced whether 2 teams or 10 were playing on maps of wildly different sizes.
Designed a config-driven economy where income scales with node count relative to total map size. All costs and rates are tunable per map tier, and playtesting data fed back into config adjustments without code changes.
Alliance-Aware Combat Targeting
When multiple teams share contested nodes, the combat engine needed to correctly identify enemies vs. allies and avoid friendly fire — even when alliances shift mid-battle.
Added an alliance adjacency matrix checked every tick before processing damage. Alliance state changes propagate immediately to the combat resolver, so a betrayal mid-fight correctly redirects targeting within the same tick cycle.
Real-Time UI Synchronization
The client UI (minimap, node panels, troop counts, leaderboard) had to reflect server state changes within a single tick without overwhelming the network or causing visual jitter.
Built a delta-based state sync system that only transmits changed properties per tick. The client interpolates between state updates for smooth visual transitions, and the UI binds reactively to a local state cache rather than raw network events.
Player Disconnect & Rejoin Handling
Players dropping mid-match couldn't be allowed to break game state — their territory, units, and economy needed to persist correctly whether they rejoined or the match continued without them.
Implemented a session persistence layer that snapshots player state on disconnect. Rejoining players receive a compressed full-state catch-up packet. Timed-out players have their territory converted to neutral with units despawned cleanly, preserving game balance.