Re: TIB: help with Extreemly basic AI...
[Prev][Next][Index][Thread]
Re: TIB: help with Extreemly basic AI...
Well, to make it into an algorithm, what I do, you should sit down with a
piece of paper and plan out the "Parts of your program". I.E. output,
clearing parts of the screen, and the AI, and whatever else there may be. Now
organize them in a fashion so that you can repeat them in that order over and
over a gain to achieve your goal. so its a giant loop For(z,1,9999999)
player input
Move position according to player
clear old player position
use new player coordinates to determine AI outcome
Output new computer move
clear old computer move
test to see if player is still alive
if not say your dead cause you stink at this game!
if yes end the loop and go back to the start
Now as to the labels being speedy..... I am sticking to my words and there
are a million more who will say the same. Labels are slow. When you changed
your game over to "algorithm style" you may have changed some of the code to
make it run slower for one reason or another, but it was not because ther
were no labels.
~Eric