Combat System in place

posted in KrisWolfe
Published August 20, 2019
Advertisement

Hello World!

This weekend met the completion of a goal I thought might take a month or so. I used Unity's ECS system to get about 10k enemies march towards the center of my map, and I had buildings created that could fire projectiles at them and kill them, throwing them away from the projectile. It has a lot of room for improvement, but it was really cool nonetheless.

The turret I made is actually hybrid ECS. It uses the same Object oriented framework I have for the rest of the buildings, but I discovered I can just make an entity inside my original classes. So while the combat ECS systems are in different files, the Turret Building that I created, that I can easily inherit and put into my code, can create and destroy a single Turret Entity that my other combat systems are waiting for. So if the building goes offline, it can destroy the entity, and if it's online, it resets the Entity. And then it can check the entity to see if it fired, or let it know it can fire. Easy stuff. The Combat System is seamlessly added into my already existing framework, and I haven't seen any bugs. What I do need to do, is configure the FindTarget algorithm so it doesn't have to go through every single enemy...have some kind of quadrant system that it tests to see if there are enemies in range if they're in a nearby quadrant. But it's currently running at 100 frames per second as it is, so we will optimize in a future update.

The Green Dots are the entities with a simple green texture mesh. The black hex is my turret building firing projectiles at the enemies.

Update1.gif.e551735bc6cd602f1ed985501e1940a8.gif

So with this system in place, what I really need to do is just start filling the databases with stuff to do. I need a story, I need dialogue, I need plot devices, and I need research in order to get to those places.

The first thing I need is characters. I'm planning on having a "counselor" for each of the systems I have in place, so 4 counselors, with varying personalities. Luckily, if I'm strong in anything, it is writing. I'm going to make a system where I can pause the game and have characters converse...this is actually only important in big events, like the beginning of the game, and when something important is happening that can kill the player.

So with this in place, we then need to define what the research tree will look like. My process will be to see what I need, and make a research for it. For the first few researches, it'll only take time, and to fill this time I want to have dialogue with the characters in order to explain what is happening. Why are we here, what is the plan, how are we going to accomplish our goals. This will all change as the game goes on and all the events start to take place, but I want to get a sense of immersion. We do this by letting the player explore.

So that's next up on the agenda...begin to piece together these systems I've built.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement