Artem Sinica showcased a stress test with over 50 units and detailed the logic behind the project.
Pretty satisfying to watch, this demo by Artem Sinica showcases Assassin's Creed-inspired melee bot logic, where enemies maintain distance, usually engaging one at a time. The system is apparently quite performant, using simple calculations and a few raycasts. Of course, further improvements like using compute shaders are possible, but for now, with only 5-10 active enemies on screen, such optimizations aren't critical, according to the developer.
The core idea involves dividing a circle around the player into evenly spaced target points, one for each melee unit. If a point collides with a wall, it's shifted closer to the obstacle. If it falls too close to the player (within a red safety radius), intermediate angles are scanned for nearby valid positions, avoiding overlap with already occupied angles.
Each target point has slight noise (random offset over time) applied, and the whole formation slowly rotates around the player, adding a subtle dynamic movement.
Bots seek out the nearest available point, and if their path crosses the player, they flank to avoid direct collisions. When the player moves too close, bots retreat outward, curving their path back toward a safe engagement point. This retreat logic is still a work in progress and may be refined further.
Artem mentioned he might consider turning this into an asset in the future, but for now, you can check out his original Reddit post for more info and take a look at Chrome Shift, his stylish retrofuturistic action game mixing top-down and 2.5D mechanics:
Join our 80 Level Talent platform and our new Discord server, follow us on Instagram, Twitter, LinkedIn, Telegram, TikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.