home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


scripted ai

by rknigh21 on 07/02/2008 23:02, 36 messages, last message: 07/08/2008 08:42, 15256 views, last view: 05/05/2024 00:42

Hi

There have been a few threads recently on scripted ai so I wondered how difficult this would be. As a proof of concept I added a call to the main ai loop in monster.h that called a script in the maps cfg file, I also added a couple of new cube script commands (ai_get_state, ai_set_state) that allows the script to get and set the monsters state. This worked and I was able to change the monsters state from the script. It did not seriously impact the frame rate. As it stands this is pretty useless as it has no way of distinguishing one monster from another and can only change it's state. However it does prove it's possible.

This raises a few questions

1)What should the ai script be able to do (change monsters attitude, movement, weapon).

2)How could the script be applied to specific monsters (maybe tag the monsters like platforms are, then have a specific script for that tag).

3)Would it be included in the main release (I do not want to end up with my own mod).

Any comments?

Go to first 20 messagesGo to previous 20 messages    Board Index   

#17: Re: ..You mean like this !

by Hirato Kirata on 07/05/2008 02:35, refers to #16

if you can get sauermod working, run it with -gssp, and you'll see it in action

reply to this message

#18: ..

by Quin on 07/05/2008 05:10

Maybe this would help a bit, but realise SSP worked only on a 4-axis meachnism so movement was easier to predict in this circumstance.. http://pastebin.com/m2ba15197

reply to this message

#19: ..

by {Qs}Homicidal on 07/05/2008 07:11

who plays single player anyways :P

1+1= <---- lol

reply to this message

#20: Re: ..

by CC_machine#12742398 on 07/05/2008 11:14, refers to #19

we do.
[/obvious]

reply to this message

#21: Re: ..sauermod ?

by rknigh21 on 07/05/2008 13:23, refers to #15

Is this Bloodfrontier ?

reply to this message

#22: Re: ..

by SheeEttin on 07/06/2008 01:46, refers to #18

Fun to play, but a real hassle to work with.
I never got it figured out... :(

reply to this message

#23: Re: ..sauermod ?

by Quin on 07/06/2008 04:31, refers to #21

It was from SauerMod's Side Scroller, and yeah, it was really ugly.

reply to this message

#24: ..

by scanf on 07/06/2008 05:46

"{Qs}Homicidal - who plays single player anyways :P"

Good point but if the AI was better maybe more effect would be put into the SP game.

I'd really like to see the monsters have more options (like suggested here). It would be nice to see them defend, not kill each other and not all pile in the same area after killing you.

Other goodies have been added to SP lately (barrels and elevators) why not upgrade the monsters :)

reply to this message

#25: Re: ..

by CC_machine#928346198 on 07/06/2008 16:17, refers to #24

i also hate the respawning SP philosophy with a passion. SP should be about making it to the end, not a high score. what, are we in the days of the Atari 2600?

in the least, make the current respawn points savegame points instead. that would stop people abusing the savegame system and put an end to the IMO-pathetic infinite lives situation we have now.

reply to this message

#26: Re: ..

by {Qs}Homicidal on 07/06/2008 18:39, refers to #24

yea the AI is dumber then President George W. Bush :P

and the lack of voice overs and cuts scenes (I know its a Huge ammont of work [but I don't care :P ])
it still feels like a tec demo its the littel non critical bits and bytes in a game that makes or breaks it
stuff like

1. fancy menu screen { that don't waste time loading a map your not gonna play )

2. Standerd admin/game controls ( aka rcon) for stuff like game play tweaking sv_gametime Sv_scorelimit sv_gun_power

2. full support for Xplodeing and moveing stuff (online) as well as full server side cube script { this would be my first pick ]

A U T O M A P / C O N T E N T DOWNLOAD its been done before with a script and there are 100's of other ways you could do it and face it we never got a reasion for why not other then ( people will abuse it / hosting issues) well people abuse the master system people abuse the coop lets remove thoses things)

as for hosting anyone play quake III
downloading the 5-20 mb pk3 takes only 30 seconds to 1 min at most and I am sure if $$ people will jump with there 5 dollor bills to pay for it
sauers maps are a good deal smaller
even with includeing texuters and stuff would still be small


and lets face it most of the stuff on quad gets ignored I bet you never seen any of the maps that are on quad in a pub
cuz no one wants to waste time digging thought a web page worrie about extracting it and hope they got it right




reply to this message

#27: ..

by scanf on 07/06/2008 21:27

{Qs}Homicidal - why would you need $$ for hosting? The way I see it is the server admins could add new maps to their servers. If the client does not have the map then the server could send it.

I'm sure the servers have a lot of bandwidth. Most Quake/Doom server are nothing special.

reply to this message

#28: ..

by {Qs}Homicidal on 07/06/2008 22:36

I ws thinking one site to host all maps IE ftp://sauermapdepot.com insted of each server storeing a map
also eihrul said once that file size was a issue ( but lol wat sauer maps are very small compaired with the quakeIII doom 3 maps ect ) moveingtargets plan for a map package format would be the best fix and would make auto download a LOT easyer to handel

reply to this message

#29: ..

by scanf on 07/06/2008 23:59

good idea. This would keep everything uniform but like you said this requires donations and someone to admin it.

reply to this message

#30: back to the original topic :)

by scanf on 07/07/2008 00:09

and now back to the original topic :)

I took a peek at the monsters AI in monster.h. Looks easy to add states to it. An example might be to add a better SLEEP state. Instead of just standing there let the monster walk around a bit.

I may have a crack at this, let me know your ideas. I'll start out simple. I will not be attempting monster communication right now. Although the game FEAR does a great job of communication between enemies.





reply to this message

#31: Re: back to the original topic :)

by sound924596 on 07/07/2008 04:18, refers to #30

I changed the pathfinding routine a little in monster.h, seems to help them get around corners better.

Changed rnd(5) to rnd(3), and restricted targetyaw to either left or right by 90 degrees instead of a random angle.

else if(trigger<cl.lastmillis && (monsterstate!=M_HOME || !rnd(3)))
{
if (rnd(180) > 90)
{targetyaw += 270;}
else
{targetyaw += 90;}
transition(M_SEARCH, 1, 100, 1000);
}

reply to this message

#32: Re: back to the original topic :)

by Quin on 07/07/2008 07:57, refers to #31

Well, if you're serious about proper movement you really need some sort of pathfinding. eg: http://picasaweb.google.com.au/qreeves/BFBots

reply to this message

#33: Progress ?

by rknigh21 on 07/07/2008 21:56

Hi All
Thanks for all the suggestions and comments. As some of this has been done before how come it has not made it into current release?

I have been adding cube script commands to modifying the monster parameters (model, health, speed, etc). This is now working and I plan to made a small map to demo it.

I have not been looking at the AI (much) or path finding. If scanf, Quin or sound924596 have the time please have a go. I was hoping we could expose some of the AI to cube script.

One of the commands I have added allows a cube script command to change a specific monster or group of monsters state.

Have fun Robin

reply to this message

#34: Re: Progress ?

by MovingTarget on 07/07/2008 22:21, refers to #33

Actually it seems Quin has already added waypoints to BF.

reply to this message

#35: ..

by scanf on 07/08/2008 08:28

Looks like it from the screen shots. Although I can't see it in the BF source.

I was looking at using the A* algorithm. But if Quin plans on putting his pathfinding in SB then I will not spend anymore time on this. Quin?

reply to this message

#36: Re: ..

by Quin on 07/08/2008 08:42, refers to #35

It wouldn't be the first time BF and Sauer have shared a resource of some sort, for example; Acord did the skins for Mr. Fixit and eihrul helped by implementing the speedy A* pathfinding in BF. It may be that the AI does get ported at one point in some form or another, but that is up to Sauerbraten, eihrul knows he has my blessings and full support if he ever intends to do so.

Once I'm done writing the base bot logic I will be creating an enemy class that uses similar logic for missions, but more map controlled. BF's system will be geared more toward having each map be its own mini game, each with their own settings and gameplay nuances (this is already done with some things like physics). Of course, I welcome any suggestions and help anyone has to offer, just talk to me on IRC.

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53863591 visitors requested 71638705 pages
page created in 0.020 seconds using 10 queries
hosted by Boost Digital