The Daily Click ::. Forums ::. Klik Coding Help ::. AI
 

Post Reply  Post Oekaki 
 

Posted By Message

gamerdudetom



Registered
  10/07/2005
Points
  18
21st July, 2005 at 00:27:57 -

The biggest roadblock to good gaming.
Does anyone know to make it with TGF (or something that makes it look like that)\
Thanks for your help (remembering)

 
Dog Games:
http://dginteractive.tripod.com

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
21st July, 2005 at 04:10:28 -

AI is a blanket term for anything immediate that happens without someone pushing a button. Be specific.

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
21st July, 2005 at 05:53:45 -

I'd say the biggest road block to gaming is making programming... but meh.
Read some articles, It'd be useless to post it here, as there is no context given.
Each genre needs different AI coding.

 
thinking is like pong, it's easy, but you miss sometimes.

gamerdudetom



Registered
  10/07/2005
Points
  18
21st July, 2005 at 09:25:46 -

So there is actual coding, in TGF?
I meant like a 2D army dude.

 
Dog Games:
http://dginteractive.tripod.com

hop



Registered
  16/03/2005
Points
  916
21st July, 2005 at 09:59:51 -

You can "code" AI in TGF just as you would code anything else in TGF. It's easy too. What do you want this army guy to do?

 
Working On:
Psydude
Castle Wars(working title)

XBLGT: sunstrike9

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
21st July, 2005 at 10:10:16 -

I never really had a problem implementing basic AI in games. I think people blow it out of proportion. Just think what the player would do in the position of the enemy, and code for that.

For example a very basic kind of AI is simply a path movement for a patrolling enemy then they stop and shoot at you when you come in to view.

More advanced AI is a bit trickier, but it's not that hard. Have bouncing ball movement enemies who fire at you when you come in to view. Then make them move a bit to dodge your bullets. Use markers to make them patrol more intelligently and not just bounce around aimlessly. Make them occasionally run towards the player to make it a bit more interesting. And so on. Just common sense really. Of course that's just overhead view game AI.

Image Edited by the Author.

 
- Tigerworks

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
21st July, 2005 at 13:04:42 -

This is all just stuff you do with the event editor. For example, you might have a circle around the enemy. If the player is within this area, and his speed is greater than 5, we can assume that the enemy can hear him.

You can get the circle to follow the enemy just by going

Always
Circle: Set position to position of enemy
Circle: Spread 1 in Value A
Enemy : Spread 1 in Value A

This also gives each enemy an ID number. Since there are two objects for each enemy (the enemy itself and the circle following him), both of these are given IDs. The numbers will automatically match, so the circle following enemy #1 will have an ID of 1, and so on.

Then to make the enemy look like he's 'heard' you, how about this:

Player overlaps Hearing Zone
+Value A of Enemy = value A of Hearing Zone
+Player speed > 5
Enemy: Look in direction of player

Here the enemy will turn to face you if he hears you. The 'value A' stuff is used to make sure the only enemy who turns is the one who heard you.


Hopefully you can see from this how you use events to tell objects what to do, and how you use several objects for each enemy.

 
191 / 9999 * 7 + 191 * 7

gamerdudetom



Registered
  10/07/2005
Points
  18
22nd July, 2005 at 01:10:43 -

Could I have a few examples please?

 
Dog Games:
http://dginteractive.tripod.com

gamerdudetom



Registered
  10/07/2005
Points
  18
22nd July, 2005 at 01:13:00 -

How could you have a parameter like that, without a visible line or cirle?

 
Dog Games:
http://dginteractive.tripod.com
   

Post Reply



 



Advertisement

Worth A Click