Edited By DeadmanDines on 3/11/2008
This is a little test demo, for some basic enemy AI.
The enemies are fishies, and they attempt to attack you.
KNOWN ISSUES:
- When going directly up or directly down, fish don't seem to notice you.
- Fish take a moment to notice you - not a bug, this is how they're designed, their line of sight process runs only once every 25 frames.
HOW THEY WORK:
All fish near or onscreen are selected and 'switched on'. Some states are tested, such as how far are they from the player, are they roughly facing the player.
If they're facing in the player's general direction, they will then run a Line of Sight routine, to determine if they can actually see the player.
Finally, based on their environment variables, the fishies will either swim idly, or chase you.
THINGS TO LOOK OUT FOR:
The main reason I'm testing this: Please see if you can find a way for fishies to escape the water and fly. The water is defined by a series of flat 'water' objects which line the surface of the water.
Currently, you cannot hurt the fish, nor can they hurt you.
CONTROLS:
Run = Left/Right
Jump = Shift
Punch = Ctrl (hold it down or tap it)
Any opinions, thoughts, suggestions would be appreciated.
(note: Screenshots are from an earlier version, the update looks a little better).
New In Update 11 March
Squirrels don't move yet, but do spot you and chase you. Their code is very much unfinished.
Problems with entering/leaving water should be resolved.
Review This Download
http://www.4shared.com/file/40442207/8c48e11f/Geronimo_Rewrite_2008_03_10_-_03a.html (3.4mb )
|