The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Artificial Intelligence......HELP!!!
 

Post Reply  Post Oekaki 
 

Posted By Message

SquishyGecko840



Registered
  28/11/2008
Points
  38
29th November, 2008 at 05:43:54 -

Can some one help me learn how to construct a relatively basic boss Artificial Intelligence. I'm really confused on how to make Artificial Intelligence in the first place. So if any one can help me just comment here.

 
oh ya

http://www.afrankwillis.com/gallery/pet%20moose.jpg

3kliksphilip

Addict

Registered
  20/11/2007
Points
  14900

VIP MemberGOTM - MAY 2009 - 2ND PLACE!The SpinsterGOTM -NOVEMBER 2009 - 2nd place!2021 Time Trial by Fire competition winnerChristmas Game Creator!
29th November, 2008 at 07:20:30 -

Depends what sort of boss you're planning to make.

 
Don't aim for perfection- you'll miss the deadline

'~Tom~ says (16:41):
well why does the custom controls for the keyboard palyer even affect the menu controls at all whats thep oint jsutm ake it so for the keyboard palyer on the menu screens everything is always up down left right enter regardless of the controls they set'

-Mr Tom, 2010

SquishyGecko840



Registered
  28/11/2008
Points
  38
29th November, 2008 at 10:21:39 -

a stationary one that is in the walls

 
oh ya

http://www.afrankwillis.com/gallery/pet%20moose.jpg

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
29th November, 2008 at 16:21:47 -

You first step would be to determine how you want your boss to move. Simply saying "a stationary one that is in the walls" isn't enough for us to help you at all. Is it an eye on the wall that shoots at you? Etc.

 
Craps, I'm an old man!

W3R3W00F

Drum and Bass Fueled Psycho

Registered
  08/11/2008
Points
  370

VIP MemberCardboard BoxThe Cake is a Lie
29th November, 2008 at 18:55:14 -

If you just mean a boss constantly on the wall that shoots at you, it's insanely simple. first, you would go to the event editor, and insert the event:


every (X) second(s)...
(here your boss will shoot X at you.
(X means specify. In this case, say WHAT object your boss will
shoot at you.) The event you want is... Have (Boss) shoot (X) at (Player) at specified co-ordinates, relative to the Player. IOW, What the boss will do every 1 second is shoot something in your Character's direction.

Idk if this helps, but That's the best way I can specify it.

Edited by W3R3W00F

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
30th November, 2008 at 11:35:53 -

I wrote an article on it. As I say to everyone else, it's specific to every game, so it's impossible for anyone to give you an AI that fits your game. It's something that you'll have to do yourself, no copy & paste engines for it.
http://www.create-games.com/article.asp?id=1913

In short, just make the computer do what you would do. That's all AI is about.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
30th November, 2008 at 16:23:15 -

In the case with a boss, you have to plan ahead of time how you want the character to act.

The two main things you might want if you're going to make any kind of character seem like it has life, and is making it's own unpredictable choices, but knows where you are... would be:
Any directional extension, if you're using 360 movement, or "Look in Player Direction"
And Random( X )

 
http://www.facebook.com/truediamondgame

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
30th November, 2008 at 17:30:50 -

Bosses often have a set patterns of movements too. So a boss might

1. swing an arm at you
2. shoot a laser at you
3. spawn little enemies
4. exposes it's core (so you can actually hit it)

then repeat the same 4 things over and over.

 
.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
1st December, 2008 at 07:24:12 -

Well, yeah, if you're lazy, you could just give it like a path movement and make them attack every few seconds. That's what a lot of the old games did

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
1st December, 2008 at 16:42:20 -


Originally Posted by Muz [AFK]
Well, yeah, if you're lazy, you could just give it like a path movement and make them attack every few seconds. That's what a lot of the old games did



And some of my newer ones!

If you're going to use this method, make sure to also include that the guy is near the boss too. It'd be REALLY dumb to have the boss going crazy attacking empty space after all!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
2nd December, 2008 at 05:26:58 -

Just spray the whole screen with bullets. That's what classic bosses do. The player is expected to go out of the area where it's attacking.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
2nd December, 2008 at 21:26:54 -

squishy is a friend of mine, were working on a game together, exactly what we want is a boss that is stuck to the wall, he will shot at you, but shoot different things depending on how far away or close you are to him, when he is almost dead he would disappear into the wall and appear on the ceiling and do more stuff, or something like that is what he said to me

 
[Game design makes my brain feel like its gonna explode.]

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
2nd December, 2008 at 21:28:16 -

oh its a platform game by the way

 
[Game design makes my brain feel like its gonna explode.]

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
3rd December, 2008 at 18:04:04 -

That's pretty straightforward then.

Make the following alterable values inside the boss:

"Distance to Player"
"Health" (...of the boss, starting at, say, 1000)
"State" (this'll be the state, whether in the wall or on the ceiling)
"Shoot Type" (the type of projectile to fire)

To work out the distance to the player, do this formula:

sqr((x("PLAYER") - x("BOSS")) pow 2 + (y("PLAYER") - y("BOSS")) pow 2)

Then set your events like this:

BOSS AI
...SENSES
......DISTANCE
.........ALWAYS - (set "Distance to Player" value to the formula above)

...STATES
......WALL
..........if health is >= '100' - (set "State" to 'WALL')
......ROOF
..........if health is < '100' - (set "State" to 'ROOF')

...RESPONSES
......SHOOT
.........WEAPON TYPES
............If distance < 640 - (set "Shoot Type" to 'Very Far')
............If distance < 440 - (set "Shoot Type" to 'Far')
............if distance < 340 - (set "Shoot Type" to 'Medium')
............if distance < 240 - (set "Shoot Type" to 'Close')
............if distance < 140 - (set "Shoot Type" to 'Very Close')
............if distance < 40 - (set "Shoot Type" to 'Extremely Close')

.........DO THE SHOOT
............VERY FAR
...............(code for this kind of bullet)
............FAR
...............(code for this kind of bullet)
............MEDIUM
...............(code for this kind of bullet)
............CLOSE
...............(code for this kind of bullet)
............VERY CLOSE
...............(code for this kind of bullet)
............EXTREMELY CLOSE
...............(code for this kind of bullet)


For each bit you'd need to comment on how it varies depending on the state (in the wall, on the ceiling, etc).

You'd want a bit (probably under 'States') which checks when the state first becomes 'ROOF' and sets the Shoot Type to something like 'HOLD' (this will stop any missiles being shot, of any kind). Then tell the boss to follow a path movement to retreat into the wall and reappear on the roof, showing a different animation (e.g. upside down).

Then stop 'HOLD'ing the Shoot Type, and its normal behaviour should continue.

 
191 / 9999 * 7 + 191 * 7

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
4th December, 2008 at 10:27:57 -

very nice, thank you much, that helps a lot

 
[Game design makes my brain feel like its gonna explode.]
   

Post Reply



 



Advertisement

Worth A Click