Progress.

Published November 13, 2006
Advertisement
Hello!

I'm so happy with the way things are going. I managed to iron out some bugs aswell as implement simple enemy AI(including shooting). However the AI is not the fancy stuff I made last time. It's all if(enemy > player) enemy.x++ EX.
No AITarget->y here [grin].
This means that I won't be able to do fancy formations and so on, which ultimately means that it won't be like a good Space Invaders clone. I'am sorry but I still remember that 3 day rewrite it took me to refactor the classes so that AITarget was the base class instead of CObject. But, I promise that the next project of mine will include fancy AI [smile](I might even end up rewriting this project's AI, I really don't know what I'll do, depends hugely on your input...).
Anyway there is still one bug which is irritating, but which I know the nature of(I think). I have set up the AI so that it shoots only when it is at the exact same Y-coordinate as the Player. So that means that if the player is at 333 or some other annoying coordinate which is not dividable by 4(I haven't checked if 333 is, however) then the enemy can't reach it, and it will be "lagging" back and forth between 334 and 332.

So yeah, a heck of a weekend, and I was sick today aswell. Will go back to school tomorrow though.

Here are some screens of the enemy shooting at me:

This was without a bugfix(Enemy firing constantly)

And this was with(Enemy fires only one shot)


I'm gonna go and find a solution to that coordinate problem, if you guys(and gals, if any) have any idea, then It is much appreciated [smile].

Laterz,
Previous Entry Progress.
Next Entry Untitled
0 likes 2 comments

Comments

Ceoddyn

if enemy.state != cooldown
if (enemy.y > (player.y - 2)) && (enemy.y < (player.y +2))
enemy.fire()


would this work?
November 13, 2006 09:55 PM
Samsonite
Yeah I don't know why I didn't think about that before [grin].

Thanks alot!
November 14, 2006 08:08 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Goodbye, Gamedev!

1215 views

Untitled

1085 views

Merry Christmas!

1115 views

Untitled

1068 views

Scrolling Demo

1008 views

New PC

887 views

Untitled

830 views

Untitled

861 views

Progress.

890 views
Advertisement