Dev Blog #0

So I decided to start a blog about the development of my current projects. Mostly because I feel like sharing what I have been able to implement over the last few weeks.

I applied the concept of “Boids” to the game mechanics of a space project that I’ve been working on. Which is basically a set of drones that follow 3 rules to create realistic swarm behaviour, A swarm-like enemy or ally could add an asymetric factor to the experience. Also I imagine that shooting a ton of lasers into a swarm of drones would look pretty amazing. Generally they provide stunning visual possibilities. But that’s a topic for another day.

For now I’d like to share a little progress for TAC. The core is ready to be extended with actual gameplay and some basic elements have reached a usable prototype stage. Or at least showable. Step by step, you know. Currently I’m working on getting the AI to behave more realistically in various situations. This is necessary for it to work with procedurally created levels. The good thing is that interaction can be abstracted to objects having traits and coupled with the visibility system. A memory layer on top can then store relevant positions over time. But I’m getting too far ahead of myself. Let’s take a look at what has been done already.

Accuracy Calculation

A basic algorithm is calculating projectile offset by the amount of consecutive shots and current movement vectors. So moving while shooting and holding down the trigger will give a stacking accuracy penality. There is no visual representation for recoil right now and the offset is calculated totally random within the calculated angle range. So it’s not the most precise, but it looks okay.

Formations and AI Movement Targets

I implemented a basic relative grid and line solver for the formation system. It can take various parameters like maximum width and spacing. However Unity’s pathfinding system is handling a lot here, I only calculate relative formation points. The next step is to implement more close pointman/wingman formations. I want to portray the movement as realistic as possible, but baby steps for now. Of course these are placeholder animations intended to be switched out once I have access to better resources. (Oh what was that? You are an animator? Contact me)

Combat, AI and Visibility

The core systems for interaction and combat are also getting better. Friendly units generate a visibility map through raycasts and some additional calculations. This map is then rendered on top of the camera to black out invisible areas. The spawn area is always visible right now, for debuging of course. With the date from the line of sight calculations I can also calulate visibility per unit. If an AI spots another AI with a different team ID, it will lock on an try to pull the trigger as hard as they can. Which looks hilariously chaotic. The ragdoll effect also needs some additional tuning. It looks…jittery. The next step would be to have the AIs react more realisticaly. They should break out of formation (if they are allowed to) and run for cover. Also they should be able to chase or flank a target. But while chasing is comperatively simple, flanking is a whole ‘nother story.

That’s all for now. I’m always happy to explain what I’m doing to encourage others to start their own projects. So hit me up on what you want to know!

Cheers

Related Projects

TAC

“TAC” was my try at a top down shooter similar to “Door Kickers” from Killhouse Games but in 3D (at that time I wans’t aware they had their own 3D...