Page 1 of 1
AI Coding
Posted: April 1st, 2010, 11:53 am
by Leo_V117
Hey Guys.
Just asking whether any of you could:
A: Give me a few Ideas as to what could make good AI
B: Tell me what codes and functions I can use in order to create the AI
C: Give me a list of functions and commands that sandbox recognises in the coding
Anyone who helps will be credited.
I need all this before monday so be quick.
List the ideas for the AI like this:
- 1: <text here>
2: <text here>
3: <text here>
List the Codes and functions like this:
- 1: <command type(eg ENT_ITEM)> - <command function>
Re: AI Coding
Posted: April 1st, 2010, 12:43 pm
by Venima
Most AIs work on the basis of several functions:
Objectives - the character needs an aim or objective. Should they try to kill the player? Should they walk up to the player and say hi? What should they do with themselves?
Pathfinding - the character needs to know where they can move and where they can't. Can they jump across an obstacle? Can they not? How close to a wall do they get before they realise they can't go that way? How do they know that they can jump up onto a platform? (And what about moving platforms? Could you get an npc to independently jump across from one to another and back?) If the player is behind a wall, do they know the player is there? What if they're attacking the player and the player goes out of sight? Do they just stop because they can't see the player? Or do they go to the spot where they last saw the player and then continue in a random direction to hunt the player down? Would they jump down into a hole that they can't get out of again?
Actions - the character needs to be able to perform actions other than moving. Do they have weapons? Do they attack? Do they talk to someone? Do they respond to the player? Are they scared of the player? Do they follow the player around? How do they respond if the player is attacking them? Do they dodge spells? And if so, how good are they at it? Is it impossible for anyone to hit them? Are they clumsy? How do they know when they've run out of mana to cast spells? How do they know when they're gonna lose a battle unless they run away?
AI is not something you complete in a week. It is one of the most complex things to do.
Re: AI Coding
Posted: April 1st, 2010, 12:57 pm
by arcones
Try checking out Movie Cube as it has waypoints and that might be helpful.
I'll let you know if I find anything else useful!
EDIT: Alright, here we go!
Stuff to do w/ bots
It may not be exactly what you want, but it may help you!

Re: AI Coding
Posted: April 1st, 2010, 1:01 pm
by Venima
pretty sure that is no where near enough code to make an NPC with AI...
Re: AI Coding
Posted: April 1st, 2010, 1:03 pm
by arcones
No, not an npc... but just the code itself... for bots... not NPCs...
I think it might also be helpful to go multiplayer as that's the only way to use bots in sandbox at the moment...
and here are the bots:
Bots

Re: AI Coding
Posted: April 1st, 2010, 2:52 pm
by Leo_V117
Thats the thing you see. Cube is ALMOST like Sandbox. I want the AI to work differently
Re: AI Coding
Posted: April 1st, 2010, 2:54 pm
by arcones
Why?
It'd be so much easier...

Re: AI Coding
Posted: April 1st, 2010, 2:56 pm
by Leo_V117
easy is an option, i would much rather set the coding to be simple and enable the ability for other users to code in their own AI