Re: [Quake-C] Frikbot, dynamic waypoints
Quake C mods and support - SSQC / CSQC
Brought to you by:
teknoskillz
|
From: Cobalt <co...@te...> - 2016-01-16 07:33:58
|
Hi 6 > So, I ported frikbot into the code recently. > (Which I have decided to re-mark v2.0 and dispense with 1.07, this will > be nothing like 1.06) > You can see the trail of waypoints, one every 128 units or so. > I might loosen that up a bit, a ton get made on large levels. Which version of Frikbot is it? A guy in Inside 3d called Dr Shadowborg made a newer unoficial release that he linked me to. There is a new routing for selecting the bots spawn that brings telefragging to nearly 0, and works well. Also it looks like the bot fires while roaming the waypoint path , and I dont remember the FRikbot that came with Q1 Arena doing that, so I am guessing its his changes taking effect. Hes also modified bot_angle_set () a great deal. Mostly randomizing the aim x and y a bit based on skill. I believe hes right, that the code as is aims too perfectly. The reason I posted about dmg_take earlier is that Frikbot drives that flash and tilt effect bonkers with the old angle set code...and a skill > 0 bot. The aim is too perfect and your screen is red constantly, making it impossible to play with alot of bots. Hes put in other changes like aiming at the feet with the RL, which is a good idea, however its only good if enemy.absmin_z = bot.absmin_z ...otherwise another calc is needed...which I am working on. > Cool. All I need to do is change that number, code is already done. > It is also possible the bots will play a level better with more > waypoints. Not sure if Im understanding what this mod does. Is it making more waypoints, or as you say the player / real client is making them as he moves? I dont think the original Frikbot has the player laying waypoints, at least not in my code travels through there. > And I'm pretty sure the bots themselves make waypoints as well. The version I have, I know they dont. Its an older version I think called FBX_b, but I am gradually modding it , and keping the b_ version in tact because in some ways its got its own characteristics worth keeping over the newer version. > So, load a level, visit everywhere - or at least the interesting places. > And then frikbot should know the level. > I can not say how those compare to human coded ones. Ok then I guess Ill have to peek at your code, I guess you are now laying waypoints with the client. If so, are you creating way files specific to maps? Also not sure , but if the waypoints have an EF_NODRAW flag, on them, they wont be part of the network traffic packets, so that will mean that much less in the packets. Bots dont use the networking anyhow, so this should be safe to do. I know at one point I had that in my version , but I removed it for some reason. Possibly because if you open the waypoint editor, they would not show up. > Also, it should be trivial to mod the supplied edit package to dump > those. > Possibly it already does. Frika used the scratch1,2,3 and 4 cvars to load the ways from .way files. I believe WaypointWatch () is called all the time and monitors whats in those cvars. The bots seem to rely heavily on the function DynamicWaypoint () called from BotPrethink(). I learned the hard way that if WaypointWatch() is still reading those cvars, and DynamicWaypoint() starts running, the waypoints sometimes wont load, or if they do the bots just stand around like they are not there. I wound up only letting DynamicWaypoint () get called after 30 frames into the game, and now the ways load perfectly so far on all maps. I have a theory that its because more than likely on the first frame in prethink, self , being a global most likely is representing ALL the bots for a while, until at least Friks stagger_think and ai_time start taking effect many frames later. I stumbled on this as I noticed Electro was calling bot_chat from prethink, and too many times often than not, the came chat text was selected by more then 1 other bot very very quicky. Other bots such as reaper and Zeus use dynamicly spawned entities, so they are already "stagger" thinking so to speak. The ctfbots in the ctfbot+ mod, which I have worked on for many years, also use dynamicly spawned ents for the bots, however they have whats called a "BOT_Mastermind" (funny eh?) which is another dynamicly spawned ent that monitors all the bots every frame for oddities and bugs , and also decides when a bot leaves, and other bots join the game. |