Jump to content
  • Advertisement

Project: AI Legacy

Unity Combat System in place

KrisWolfe

1015 views

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 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By ethancodes
      I'm fairly new to creating full 2d levels, so please feel free to correct me if I use incorrect terminology or if I'm doing something wrong here. Currently, I am using the Tile Palette with several sprites placed on it to create my levels. With that I can just run my mouse across the screen and quickly place tiles. Then on the TIlemap gameobject I place a Tilemap Collider and a Composite Collider. This works great, it's quick, simple, and efficient. However, for the next part of my character controller I'm looking at adding the ability to do a ledge grab. After doing some research, it seems like a common way to do that is to make the ledge he can grab "grabable" by putting a different collider on them. So my question is, is there an efficient way to where I can let the Tile Palette know if I use a specific corner sprite, place the ledge grab collider on it? Is there any way other than going through all the ledges in the game and manually placing them there? I'm also open to any tips on level building and using the Tilemap, etc that may help me out as, like I said, I'm pretty new to it all. Thanks!
    • By syedMohib44
      Hello guys I am a bit confused on rotation and position in unity. The thing is when I am at 0 rotation on X-Axis and I restricted my player to not let it go more than 10 on x-axis and less than -10 x-axis but when I rotated it to 90 degree It stated to move forward on left key press and backward to right key press. I just want to clamp position between 10 and -10 on every rotation It must not move differently when rotated... e.g for some understanding the scenario If a player is on a road and it is restricted to go on foot path then it should also be restricted when rotated to left or right... Please help me with this guys any help would be appreciated. 
      Thank You.
    • By Doctrina Kharkov
      We released an arcade story-driven game created by 12-13 years old children.
      All coding, art and animation was madden by them.
      Game have 5 unique mechanics levels.
      https://play.google.com/store/apps/details?id=com.Doctrina.Skonny
       
    • By VoroNoise
      Main designer here with a massive scale RTS/grand strategy/city builder/god game. If this sounds interesting and you're an artist or programmer with ideas then please contact me! We can make a bundle! I already have musicians with solid tracks. About three quarters of the way through total development, just need minor details filled out and a lot of art assets worked in.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!