Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Well, i have begun to program the AI system for my fighter game. I want to be able to make them think, not just fly by and hope for a shot. I have been successfully, in theory, to implement a two fighter attack against the player, working in tandem, but there are many holes in it that i have yet to work around.

I am trying to figure a better way for AI/Enemy class interaction...right now each class is passing Vector2D objects that tell position and velocity...this has many inherent flaws, because it doesnt hold data on if they are alive/rendered, bullet options, collision detection, etc...i would just create another instance for the gEnemy to pass to the AI object, but it throws up linker errors, and the eEnemy class is strictly singleton because of the loading routines (they load image data, if i initialized any more than one, blammo sharing violation or mad cazy memory usage)..

So yeah, right now i have the main class with an instance of gEnemy and gAI, and they interact using Vector2D objects, but i need something better.

I dont know, im pretty lost.

Oh, and actually implementing wide-scale enemy fighter AI is a whole other story.

Any tips would be appreciated..

Until next time.
Sign in to follow this  

1 Comment

Recommended Comments

Just had an interesting idea for group ship movement: think Reynold's Boids (a flocking algorithm, Java adaption) adapted for space battle. With a few modifications, you could get some pretty intense all-on-one swarming action for your enemy ships. Plus, you wouldn't have to worry about individual AI, because the algorithm treats the mass of ships as a whole.

Wait... this is a good idea. Instead of having all the enemy ships grouped together, group them into wings. Each wing gets its mean directions, etc calculated independantly, so you could end up with a bunch of swarms swarming your ship, ultimately resulting in an untimely death.

I need to stop posting at night...

Share this comment

Link to comment

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

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!