Post news RSS Turnover - Enemy Interaction & Composite Work

Details on enemy interactions, world planning, and the gameplay composite.

Posted by on

Enemy Interaction

Been spending some time adding more systems into the engine so I can do the things I would like to do.

I rewrote how vision is handled by the enemies in the game. Instead of vision and line of sight being tied specifically to the player, enemies' vision has been pushed to the collision system and can now interact with the entire world. I figured that there would be a greater need for better interaction between the world and the enemies so I just bit the bullet and did the work.

One thing I added in is the ability for enemies to become startled by the presence of dead comrades. So, if an enemy was shot down by a rogue Security Turret, a patrolling enemy will become alarmed by the presence of his dead friend. This complements things that are already implemented, such as cameras alerting guards, attack dog barks alerting nearby guards, etc... In time, more interactions will emerge, I'm sure.


The majority of my time recently has been spent creating a mini-version of the game which I'm calling the game composite. I'm working on 5 levels that will be a solid representation of what the gameplay will be like. When this is finished, I'm going to test it and give it to others to test so I can see if things are turning out alright. I have been using these 5 levels as the sandbox for testing different gameplay scenarios, move speeds, HUD changes, and anything else that will add to the game.

At this point, the game feels good. The 5 levels are an introduction, but are challenging enough to be fun. Setting up a composite has really kept me focused on the game project as a whole and has prevented me from becoming overwhelmed by everything. I just recently completed a game flow document that contains the level setup and game beats.

Turnover level in Tiled Map Editor


Here's a shot of what a level looks like in the Tiled editor and the result in-game. Just thought someone out there might find it interesting.

I create the worlds inside Tiled and export them as .json files. I wrote a parser for my engine that will read all of the resource data and properties from the .json, then load the the level so it is ready to go. i'm really proud of how this all turned out.

go0der - - 153 comments

Awesome to hear that you made the enemies even smarter. Do you still give them the player or does your collision system have certain tags attached to let them know what they are?

Reply Good karma Bad karma+2 votes
anthnich Author
anthnich - - 23 comments

Hey, thanks for reading!

There is some minimal player passing, though I am attempting to eliminate it where I can.

The collision has a two rung system: a flag system, where each entity is assigned a flag to give hints about what they are (player, enemy, special tags), and a callback system, where the colliding entity is passed to the collidee. This lets me grab its flag or any other specific attributes that I need for handling interaction. Working alright so far!

Reply Good karma+2 votes
go0der - - 153 comments

very nice, I'll have to try that. Keep makin' that code neater and better.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.