Home Register Arcade Gallery Chatroom Members Today's Posts Log In
Go Back   Inside: SereneScreen Fan Forum > SereneScreen Products > Marine Aquarium 3 for Windows > Marine Aquarium 2 for Windows Archive
Notices

Reply
 
Thread Tools
Old 10-23-2001, 12:59 PM   #1
pipeta
Royal Gramma
 
pipeta's Avatar
 
Join Date: Nov 2001

Location: Israel
Posts: 146
AI for the tank

I wanted to understand how the AI (Artificial Intelligence) for the tank works so this is a question for Jim. My guess would be that the fish have a large net of courses. When a fish reaches a division in the course it selects a random way to go through. Am I right?

I am trying to understand how these things work since I really love programming (I learned Pascal in school, started learning C on my own and plan to learn Direct3D soon) and I am considering a career in computer gaming (Which means I will have to move to the U.S. or to England (I live in Israel)).
I already understand how 3D engines\rendering images work and I understand the basic ideas for creating Collision Data. I would like to know as much as possible about these subjects, including building AI, especially for shooters (which may get very complex).
So, anyone who knows of sites dealing with the subject of AI algorythms (basic ideas for shooters\strategy games), please post a link. If you know anything about the subject feel free to e-mail me at 'jlahav@netvision.net.il'. Thanks in advance.
pipeta is offline   Reply With Quote
Old 10-23-2001, 03:11 PM   #2
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,774
Re: AI for the tank

The AI is hard to describe in a few words. It consists mostly of setting several timers to random numbers, then changing a parameter when it's timer counts down.

For an extremely simplified example, the program might:
Set the TURN timer for fish 1 to a random number (say, 5.2 seconds).

When the timer goes off, flip a coin to determine whether to bend right or left, and pick a random target amount to bend.

Bend the fish mesh about 1/10 (or a random number which determines the quickness of the bend) of the target amount per frame, and turn the whole fish accordingly.

If the fish is now pointing directly towards or away from the camera, see if it would be possible for the fish to pass from the front of the tank to the back at that position (or vice-versa). If so, flip a coin to see if it should actually do it.

Check to see if anything in these movements will cause the fish to come too close to another fish or the top, bottom, or sides of the tank. Adjust movement accordingly.

Repeat all this for up/down movement and speed for fish 1, then all the other fish.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote
Old 10-24-2001, 12:14 AM   #3
pipeta
Royal Gramma
 
pipeta's Avatar
 
Join Date: Nov 2001

Location: Israel
Posts: 146
Re: AI for the tank

Thanks Jim, it's really interesting. So you don't have a given course for the fish. Nice!
pipeta is offline   Reply With Quote
Reply
Go Back   Inside: SereneScreen Fan Forum > SereneScreen Products > Marine Aquarium 3 for Windows > Marine Aquarium 2 for Windows Archive




Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -6. The time now is 11:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.