⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 游戏编程精髓里的人工智能源代码很好的源代码!
💻 TXT
字号:
Author: Steve Rabin
E-mail: stevera@noa.nintendo.com
Last revised: 5-20-00

This MS Visual C++ project is the AI engine described in the book Game 
Programming Gems within the article "Designing a General Robust AI Engine". 
Please refer to the book for a full explanation of the implementation. 
Comments within the code also provide additional information.

The state machine language uses a few custom keywords that should be 
highlighted by Visual C++ in order to make the state machine more 
readable. You can get Visual C++ to highlight these words by placing the 
file "usertype.dat" (included in this directory) into the same directory 
as Msdev.exe (C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin). 
The file "usertype.dat" is simply a text file listing the state machine 
keywords.

Here is a brief overview of the state machine structure.

Each game object can point to a state machine. When that game object 
receives a message, it gets routed to it's state machine. The state machine 
can execute any code on behalf of the game object and can send additional 
messages, delayed messages (timers), can change state, or can destroy 
itself. Actually, each state machine can execute any code within your 
game. It is completely general.

The state machine language was designed to provide a simple, consistent, 
robust, and general implementation of a state machine to every game 
object. The language itself consists solely of macros that have been 
carefully crafted to fit together like puzzle pieces. You can see an 
example in the file "fsm_drone.cpp". The macro language can be found in 
the file "fsmmacros.h".

The AI engine provided was ported from C++ to C in order to show that it 
doesn't rely on any object-oriented techniques and that its generally 
applicable (also for legal reasons). I would highly advise porting it back 
to C++ so that it can take advantage of object-oriented techniques (even 
though it doesn't require them).

Good Luck!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -