Movement Schemes and AI

posted in Beals Software
Published October 31, 2009
Advertisement
I got the actor controller system started; two separate hierarchies: UserActorController and AIActorController.

The UserActorController uses a combination of the mouse and keyboard for control and is setup for the two different movement schemes. I'm not sure if I actually went over those, so here's a 'definition':
Absolute: The actor aims at the mouse, but WASD move you Up, Down, Left, and Right.

Relative: Again, the actor aims at the mouse, but W and S move you toward and away from the mouse.

I was going to stick with absolute however, I believe they each have their purpose. Absolute movement is good for running and gunning (say you want to run Up, but aim to the left and mow down a line of monsters.) It's also good for clearing out small areas or something like a boss fight.

Relative movement is a lot easier for actually traveling though. Switching between the two will be key-bound, so it should be pretty easy if needed.

At the moment the AI is just a simple function that checks to see if the target less than 150 pixels way. If so, they start attacking. Once they've started attacking, you have to get 300 pixels away before they'll stop.



The little dude being mobbed is actually I sprite I made for the original Invasion, but stuffed away because I decided not to do top-down back then. He was green and had a little detail, but I ruined that scaling him up to get rid of issues when rotating.

The gun and 'x75' at the bottom are just graphics test; nothing implemented yet.

Alrighty; bed time.
Previous Entry Untitled
Next Entry Explosions
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!
Advertisement
Advertisement