View Single Post
Re: Lord of the Rings Oline bot Creation.
Old
  (#2)
SamPlay
Member
 
Status: Offline
Posts: 46
Join Date: Jan 2006
Default Re: Lord of the Rings Oline bot Creation. - 26-03-2011

Hi,
be aware that it is difficult to guess what your skill in math/coding/... are, so do not feel insulted if what I tell in the following is obvious to you. I am not an expert but i have been coding a bot for HL1/CS since several years.
1. ABOUT .net:
All the bots I have seen are coded in C++( older ones ic C) or in some game specific language, usually close to C ( eg: unreal tournament which has also specific framework to exchane info with the engine, see also Omnibot) or generic scripting language like Lua. Using .net will get you into learning things that you will not need for FPS bots, and and it does not seem appropriate for speed reasons. My choice would be c++, unless the game engine forces you into its specific language.
2. AUTOFACE: what do you mean? a direction can be specified as a vector or a set of 2 angles; so understanding the one you are talking about being the direction given by the 2 points (PlayerPosition,TargetPosition)...
a. are you talking about the VIEWANGLES ( direction "of the eyes", ie center line of the field of view), meaning you want the bot to LOOK in the wished direction?
b.or is it the BODYANGLES ( the "facing"), like the torso for a human or the hull for a vehicle (there are 3 bodyangles yaw,pitch,roll but the 3rd one is assumed to be null when stating a "body" direction).
c. or is it the SPEEDANGLEs, ie the direction of speed ( current speed if not null, or wished speed if it is current is null but you intend to move forward).
3. once clear about the hereabove, you have to find into the game engine or the interface it provides to you as mod/bot coder how you can
- retrieve info ( the 2 positions)
- input an order for the adequat angles/vector ( the wished direction), computed from the 2 positions.
4.To try and be more "human player-controlled" like, bot code usually add some filtering between the straight computation of the wished direction and the one actually input in the game engine ( 90% of the time it is "spring and damper" system). I would guess all bots on this site do that in one form or another. This also mean that, like any time you deal with a dynamic system, you need a Bot data structure to store and carry over some data over one frame to the other ( for each bot), as well as being able to retrieve the GAME time elapsed between 2 frames ( or an expected or approximated value).

Hope this is of some help.
If you are more specific, maybe we can help better ( though AFAIK Lord of the rings has never been addressedon this site).
  
Reply With Quote