Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / 007 game help AI

Author
Message
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 16th Jan 2005 03:00 Edited at: 17th Jan 2005 02:42
i am making a 007 game.

at the moment you go around with a gun and an aimer on the middle of the screen and you can't go threw walls.

the whole idea of this level is where you go around with a dart gun and shoot some idiot gaurds.

can some one help me make some ai so the gaurds walk round and if they see you they try and raise the alarm.

if you got a game called 007 nightfire then you know what i mean if you have got up to the skyscrapper level

thanks

please help


EDIT: i'm sorting the ai out on a differnt thread (help me please thread)
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 18th Jan 2005 20:12
make a cone
glue to the guards
make box
glue it to the camera
then you include this into the do\loop:

do
if object collision(1,2)=1
yrotate object 1,camera angle y()

endif
loop


easy
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 19th Jan 2005 01:14
Yeah but what happens if you don't want to use so many polygons. I've been trying to work out how to do that without using an object. ITS HARD!


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 20th Jan 2005 01:09
i have got a better thread about ai click on this link

http://forum.thegamecreators.com/?m=forum_view&t=46158&b=1&p=0

hey sabberdude that code you put on thread dose not work. on the link.!!
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 20th Jan 2005 04:02
Yeah I know You already said. try and debug it yourself. Just look through and see if I or you have made any errors


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 21st Jan 2005 00:22
thanks
ill look
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 21st Jan 2005 00:53
i tried and failed misrabley

can you have a look

i put the code here


thnaks
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 21st Jan 2005 03:46 Edited at: 21st Jan 2005 03:46
thanks for the code

how do you get it to go in a square??? not a line or a diagnol. i tried to get it to go in a square but it does not??

also i cant get so that if it did go in a square to go round and rounD the square in frount of the camera
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 31st Jan 2005 02:31 Edited at: 31st Jan 2005 02:36
really REALLY sorry i couldn't post earlier - had a crappy unworking connection!
anyway - i'm here now (hope you didn't give up on me )

hold on... let me read on these replies first - i will get back to you soon...

P.S. I just posted this to let you know that i'm still alive

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 31st Jan 2005 03:30 Edited at: 31st Jan 2005 03:31
ok but its a bit late i ve nearly sortes it out but i need your help still
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 31st Jan 2005 07:51
about ur question on ai:

the way i see it is already read out by saberdude - simply put, it's like this (take some time to read and think about this):
first, you need to store some positions (preferably in arrays) for EACH INDIVIDUAL GUARD that indicates his complete patrol path i.e. one that restarts from the beginning.
next, you want to put your guard on this patrol path and make him actively follow it - how? Simple piece of cake:
at the start, the guard is in the first position of the array and a marker variable is used to show this. then, in the main program loop, you have to point the guard to the next position in the array (marker variable+1). third comes making guard move to this new point. fourth, when he gets their increment the marker variable. fifth repeat all of this over and over again until the marker variable reaches the limit of the array which is when you must reset the marker variable to it's original value.

now, a little off the topic - when can get this game complete and out?

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 31st Jan 2005 07:52
oh yea

what else do u need help on?

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 1st Feb 2005 01:04
well 1st the ai.

so far i have got this gaurd well currently a box going backuard and forward i made this code with the help of sabberdude but i need it to go in a square.



2nd how can i make it so when you go near a gurd it plays an animation. i have got this copde and put it in my game but it did not work??


3rd off topic of ai how can i make it so thjat when you fire and a bullet hits a gaurd it plays an animation.
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 2nd Feb 2005 04:20
got ya - i'll start workin on it.

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 2nd Feb 2005 04:20
did u take on my suggestion above?

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 3rd Feb 2005 00:13
thanks for working on the AI.do you no when it will be done. what suggestions?
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 3rd Feb 2005 08:04
the suggestion about the moving in array, counter (read above)? i just had the greatest idea - why don't we make a small team - i'll do most of the programming and stuff - how about it?

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 4th Feb 2005 00:18
for thge AI ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 4th Feb 2005 06:52 Edited at: 4th Feb 2005 06:54
yes - the above array counter thingy is for the ai concept - just ask if you have trouble but i'm already working on getting a working edition for you to study

how about that team idea? i'll do the programming bits

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 5th Feb 2005 00:01
what for my whole game or just the ai
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 5th Feb 2005 03:47
no no - for the whole game

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 5th Feb 2005 04:21
yea i wanted it to be my own project but i dont mind about the ai!! set up a team but it's only AI !!
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 5th Feb 2005 22:49 Edited at: 5th Feb 2005 22:52
so i'm in only for the ai? if so - count me in. theres' just one catch - please put me on the credits page at the end okay?(please!)

also - when i said team i just meant you and me cuz i have no other members to recommend

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 5th Feb 2005 23:11
yep. and you will be on the credits at the end but theres only you and me.!!!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 5th Feb 2005 23:12
have you got msn or anything
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 5th Feb 2005 23:32
Hem Hem, I did help y'know...


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 6th Feb 2005 00:40
yea sabberdude you can be aswell for starting me off. and orther things thanks. do you want me to put sabberdude on the credit or you tell me your name up to you.
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 6th Feb 2005 05:27
Put Saberdude, thanx


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 6th Feb 2005 17:55
ok
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 6th Feb 2005 17:56
i have still got to make a few levels for the game and get ai sorted out
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 7th Feb 2005 05:23
sorry for being so late


great - let's get to work - i'm ALMOST there on ai - i think you'll love it

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Feb 2005 05:33
sounds good!
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 8th Feb 2005 02:51
Are you gonna have scripted AI or are you going to have the AI kind of do what it thinks is best.
e.g. Will the guard walk along a set path when he spots the player or will he work out a way to you?


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 8th Feb 2005 03:50
i dunno dehoncha said he was doing the ai
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 8th Feb 2005 05:03 Edited at: 8th Feb 2005 05:13
forgive this double post

btw, how do you make the link like you guys ("+code snippet") thingy?

and hey saberdude - hows life been?

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 8th Feb 2005 05:10
heres what i have so far - it'll need modifying though - tell me how (move here - there - do this - this animatino etc...)

just a brief description - this makes the guards walk along a predefined path. this is like a patrol path - he isn't heading towards the player. if you've played deus ex - you know exactly what i mean.

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 8th Feb 2005 15:09 Edited at: 8th Feb 2005 15:09
looks good can you try a square. does it go in this shape download

thanks very very much

Attachments

Login to view attachments
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 8th Feb 2005 15:22
i slowed the code down.
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 9th Feb 2005 01:47
Ummm actually you broke the code...nothing happened
Anyways as for life, well its half term next week(YAY!) but I've got the nasty BCG Injection tommorow OUCH!
The code is good. But I'm pretty sure you could simplfy it.


Thanks to Animeblood for the Logo!
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Feb 2005 02:08
sorry i did not cut and paste the last few lines of code.
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 9th Feb 2005 06:24
try editing the co-ordinates to fit a square - it should work then

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 9th Feb 2005 06:26
the shape i used was just some random co-ordinates

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 9th Feb 2005 06:27
and saberdude:
good luck with the bcg - you can reduce pain by not looking (it actually works - not anticipating pain causes it to be less )

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Feb 2005 15:00
is that true if you dont look
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 9th Feb 2005 15:08
heres the code kind of square/circle/triangle
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 10th Feb 2005 04:50
Ha the BCG hardly hurt at all.


Thanks to Animeblood for the Logo!
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 10th Feb 2005 06:16 Edited at: 10th Feb 2005 06:18
well good for you saberdude!!

hi - i'm looking at your code now - get back to you in a second

and yes not looking reduces pain

For when they said I couldn't, I did...
DeHonCha
20
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: A world of my own...
Posted: 10th Feb 2005 06:19
just remove the remaining cords - just 4 cords needed for square - remove the rest and adjust the for-next loop (later on_)

For when they said I couldn't, I did...
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 10th Feb 2005 15:20 Edited at: 10th Feb 2005 15:20
?
so i take away till 4 and ??????????????????
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 11th Feb 2005 05:34
possible square and i have new thread as you want to be up to date
about [center]weapons firing missiles very hard to solve i am crap at coding by the way

here is an link

http://forum.thegamecreators.com/?m=forum_view&t=48005&b=1

Login to post a reply

Server time is: 2025-05-23 19:52:47
Your offset time is: 2025-05-23 19:52:47