.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Sandbot (http://forums.bots-united.com/forumdisplay.php?f=85)
-   -   progress (http://forums.bots-united.com/showthread.php?t=10041)

Persephone 31-12-2018 17:34

Re: progress
 
OMG, how could I didn't realize that. So you're referencing to "CP" instead of "CTF" mode. I'm sorry then :(

I appreciate your work. However, in my opinion, I think you don't have to do it because Capture Point mode isn't as good as Capture Flag mode. That mode looks boring sometimes. You're just roaming around, occupying each territory, and finally defending it from an enemy invasions. Occupying all territories is not easy, especially if the spawn points for each player are too near with the capture zone.

In op4cp_park for example, two of capture zones are too near with the player spawn locations, so its impossible for enemy team to capture it before being killed. Moreover, this mode is so hard because it requires at least a same amount of players for both teams. Otherwise, you can't win if you're outnumbered (in CTF mode, its possible to win even if the enemy team has more players than your team)

tschumann 01-01-2019 02:35

Re: progress
 
I've never really played it but I'll add support so that Opposing Force support is complete.

Persephone 03-01-2019 18:56

Re: progress
 
Well then. It's up to you for making sandbot supports on any gameplay modes or not.

However.....

One important note. I hope your sandbot wouldn't get any trouble like hpb_bot each time the CTF game has finished because I want to save "ctf stats" but unfortunately, my game are always crash when the battle is over due to unknown reason.

Please watch my video here so you can understand my problem.

https://www.facebook.com/dinar.perse...46537679421007

tschumann 04-01-2019 01:00

Re: progress
 
Is it Sandbot that is crashing or HPB_Bot?

Persephone 04-01-2019 03:21

Re: progress
 
Like I said above. It's HPB_BOT. However, because your Sandbot source code probably based on it, then I just want to warn you if HPB_BOT always crashing my game every time I want to see the stats. I hope you can fix it in your Sandbot (I didn't test your bot due to bot_count problem)

tschumann 05-01-2019 04:51

Re: progress
 
Ah okay - I don't remember testing round end for Capture the Flag but I've changed a lot of what HPB_Bot did with regards to round end.

Persephone 26-03-2019 07:12

Re: progress
 
Still no update yet? Is this project still in progress?

Btw, I can't play Gunman Chronicles with your Sandbot. It would crashing my game immediately. Can you help me?

tschumann 30-03-2019 22:21

Re: progress
 
Yeah I've been busy working on other projects - I will get back to Sandbot.

Are you using MetaMod with Gunman Chronicles? I think it crashes with standard MetaMod but works okay with MetaMod-P (I included the working version of MetaMod in the download).

Persephone 04-04-2019 19:10

Re: progress
 
Wow, thanks a lot sir. With your Metamod, now I can playing it with Sandbot :D

This is my gameplay for you. Watch it here :

https://www.facebook.com/dinar.perse...t=feed_comment

By the way, I'm not sure about this, but it seems your bot are always attacking me so often. Sometimes I wonder why they didn't just looking for another target to attack instead of me? This is could causing a problem especially when creating video like above, because I want to make a "preview" of all weapons from Gunman Chronicles but your bot seems didn't want to give me a chance. Most of the time they will surround me and then start shooting me together.

Maybe I could make a better video if I change the bot_count, but unfortunately, I can't :(

tschumann 13-04-2019 00:06

Re: progress
 
Nice - what is the entity that exploded into little creatures when you touched it? I don't remember it in the campaign.

The bots don't preference anyone - they should just attack the nearest player and won't stop until either you or the bot dies. You should be able to to set observer 1 to stop bots from attacking real players.

Persephone 13-04-2019 18:21

Re: progress
 
Entity that exploded into little creatures when you touched it ?

Are you talking about the creatures from my video on 1:52 ? It was called decore_sittingtubemortar

About the monster, have you noticed if there are some monsters on my map like Mines, Eagle, Pteranodon, and even Helicopter? There are Mini Turrets on each hill too but I didn't show them. You can kill them if you want.

By the way, I want to ask two things to you :

1. There is an enemy called "Turret" which bigger than Mini Turret. However, unlike on Half Life, this Turret seems invulnerable. How to kill it? Even Chemical Gun with zero acid, zero neutral, and base maxed, it won't help too much.

2. In map editor, there is an entity called "weapon_aicore" which also present on my map. However, I still don't know what a function of that weapon until now. Can you explain it to me?


About your bot : Yeah, I forgot about observer mode set to 1, lol xD

tschumann 14-04-2019 12:23

Re: progress
 
Ah thanks - yeah I saw a few monsters around the map but I didn't recognise that one.

Not sure about the turret (or most Gunman Chronicles entities) but if it's anything like GMan in Half-Life the TakeDamage method probably does not subtract from pev->health.

weapon_aicore is used in the campaign in some maps to trigger some entities but doesn't do any damage I believe.

Persephone 02-05-2019 21:40

Re: progress
 
Tschumann, I need your help

I want to create an Opposing Force map with CTF gameplay. I've placed a base, flag, etc. Also I'm not forget to set "defaultctf" to 1 so it wouldn't become a deathmatch map.

However, when I tried it, I noticed if something has gone wrong. I didn't see any flag on my map. Instead, look at the bottom left corner. It seems my map was set to "cp mode" instead of "ctf mode", for some reason.

Well, can you help me sir? How to set the gameplay into CTF mode???

https://i.ibb.co/JRrRRCg/ongotan.jpg

tschumann 04-05-2019 07:39

Re: progress
 
I'm not sure - I've never done any mapping for Opposing Force but do you have a info_ctfdetect entity?

Also, I've started repurposing botman's waypointing tool to work with Sandbot: https://github.com/tschumann/sandbot-wptgen
Completely untested but it compiles.

Persephone 04-05-2019 18:02

Re: progress
 
Yes, I have entity called "info_ctfdetect"

However, it was used to converting a map from deathmatch into ctf mode. I never faced this problem in the past. This is my first time I find if that entity will converting my map to cp mode instead of ctf. I don't know why @_@

I don't remember when the last time I made a ctf map for Opposing Force. But I'm swear if I never encountered this error before.

tschumann 05-05-2019 03:39

Re: progress
 
Yeah that's strange - the map name starts with op4ctf_ as well I assume? Not sure how the game checks.

You could try asking at https://twhl.info/ as there are lots of GoldSource mappers still there.

Persephone 07-05-2019 19:30

Re: progress
 
Sorry sir, but I've found a solution for my problem.

It seems I was placed an entity in wrong place. I put it too near with the ground. So the flag will missing and that's why I couldn't play on CTF mode xD

https://i.ibb.co/dbGP4WK/59305782-15...ent-iad3-1.jpg

By the way, back to your Sandbot. How about the progress? Does your Sandbot no longer has bot_count problem? :D

tschumann 10-05-2019 13:19

Re: progress
 
I've been working on other stuff so work on Sandbot has been slow. I do want to get another version out soon but I still want to finish Opposing Force Capture Point support (the entities are a mess to make sense of).

In the next version bot_count should get written to config.cfg - is that what you meant?

Persephone 22-05-2019 18:03

Re: progress
 
Yes, I hope bot_count problem can be fixed as soon as possible because I need it to avoid "chaotic gameplay", creating a waypoints, etc

About Capture Point mode, just forget it. Even there are no other maps beside op4cp_park which has that mode. It means this mode is underrated

tschumann 26-05-2019 10:47

Re: progress
 
I know but I want to finish Opposing Force support before moving onto other stuff.

I've been a bit busy with other stuff lately unfortunately but hopefully I'll have a bit more time to work on Sandbot again soon.

RoboCop 26-05-2019 15:21

Re: progress
 
Also I've been looking at your src code and didn't find anything wrong. But I've figured that the optimisation flags may need altered a bit.

Code:

-O2 -march=i686 -mtune=generic -msse2 -mfpmath=sse -fomit-frame-pointer -finline-functions \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 -pipe -m32 \

As for Windows builds, I've been using the newer VS 2019 as well been analysing any potential coding issues. It seems possible that the bot.cpp is not dependant on the 'cbase.h' header. Plus my VS2019 gave me some warning messages on 'bot_t::bot_t()' in line 1832 contains uninitialised members, for whatever it means to me... But my ReSharper C++ suggested on the solution to fix that warning message by typing this into this line:-

Code:

bot_t::bot_t(): respawn_state(0), bShouldInit(false), skin{}, not_started(0), start_action(0), kick_time(0),
                create_time(0), bot_team(0),
                bot_class(0),
                bot_money(0),
                idle_angle(0),
                idle_angle_time(0),
                blinded_time(0),
                prev_speed(0),
                prev_time(0),
                f_find_item(0),
                pBotPickupItem(nullptr), ladder_dir(0),
                f_start_use_ladder_time(0),
                f_end_use_ladder_time(0),
                waypoint_top_of_ladder(false),
                f_wall_check_time(0), f_wall_on_right(0),
                f_wall_on_left(0),
                f_dont_avoid_wall_time(0),
                f_look_for_waypoint_time(0),
                f_jump_time(0),
                f_dont_check_stuck(0),
                wander_dir(0), f_exit_water_time(0),
                f_waypoint_time(0),
                curr_waypoint_index(0),
                prev_waypoint_index{},
                f_random_waypoint_time(0),
                waypoint_goal(0),
                f_waypoint_goal_time(0),
                waypoint_near_flag(false),
                prev_waypoint_distance(0),
                weapon_points{},
                pBotEnemy(nullptr),
                f_bot_see_enemy_time(0),
                f_bot_find_enemy_time(0),
                pBotUser(nullptr),
                f_bot_use_time(0),
                f_bot_spawn_time(0),
                killer_edict(nullptr),
                b_bot_say_killed(false),
                f_bot_say_killed(0),
                f_sniper_aim_time(0),
                f_engineer_build_time(0),
                sentrygun_waypoint(0),
                b_build_sentrygun(false),
                sentrygun_level(0),
                sentrygun_attack_count(0),
                f_other_sentry_time(0),
                b_upgrade_sentry(false),
                dispenser_waypoint(0),
                b_build_dispenser(false),
                dispenser_built(0),
                dispenser_attack_count(0),
                f_shoot_time(0),
                f_primary_charging(0),
                f_secondary_charging(0),
                charging_weapon_id(0), f_pause_time(0),
                f_sound_update_time(0),
                bBotHasFlag(false),
                b_see_tripmine(false),
                b_shoot_tripmine(false),
                b_use_health_station(false),
                f_use_health_time(0),
                b_use_HEV_station(false),
                f_use_HEV_time(0),
                b_use_button(false),
                f_use_button_time(0),
                b_lift_moving(false),
                b_use_capture(false),
                f_use_capture_time(0),
                pCaptureEdict(nullptr),
                bUseArmory(false),
                fUseArmoryTime(0), points_spent(0),
                bBuild(false),
                fBuildTime(0),
                bBuildAlienResourceTower(false),
                bBuildHive(false),
                bUseDoor(false),
                fUseDoorTime(0),
                iGoalIndex(0),
                current_weapon(), m_rgAmmo{},
                pLightEnt(nullptr),
                fMaxSpeed(0),
                fSpeed(0)

Or by using a different method for Sandbot. Also I've noticed h_export.cpp had depreciation warnings on 'strcmpi' but I think the best way is to add near h_export line 22 is this:-

Code:

#ifdef WIN32
#define strcmpi _strcmpi
#endif

Even though those alterations to the code didn't effect the VS2019 compiler as it gave less warning messages, but I cannot guarantee that it will work better for Windows Servers. Besides it was tricky and painful as Sandbot Linux had problems with the CXX ABI errors as having Sandbot not compiled with GCC/G++ 4.8 or earlier caused those CXX ABI errors. Due to the Steam Runtime Libs being outdated, unlike Sven Coop v5 that has most of the up to date libs and its own custom modified Svengine from GoldSrc.

The Storm 26-05-2019 22:25

Re: progress
 
The C++ runtime can be statically linked to the binary. This will resolve all problems with
the ABI. It will also increase the binary size of the final .so file but nowadays that is really not as issue.

RoboCop 28-05-2019 16:34

Re: progress
 
1 Attachment(s)
@tschumann

Also I've been using the trial version of PVS Studio Analyser on SandBot and spotted a few performance issues here:-

tschumann 01-06-2019 12:13

Re: progress
 
Quote:

Originally Posted by RoboCop (Post 67285)
Also I've been looking at your src code and didn't find anything wrong. But I've figured that the optimisation flags may need altered a bit.

Code:

-O2 -march=i686 -mtune=generic -msse2 -mfpmath=sse -fomit-frame-pointer -finline-functions \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 -pipe -m32 \

As for Windows builds, I've been using the newer VS 2019 as well been analysing any potential coding issues. It seems possible that the bot.cpp is not dependant on the 'cbase.h' header. Plus my VS2019 gave me some warning messages on 'bot_t::bot_t()' in line 1832 contains uninitialised members, for whatever it means to me... But my ReSharper C++ suggested on the solution to fix that warning message by typing this into this line:-

Or by using a different method for Sandbot. Also I've noticed h_export.cpp had depreciation warnings on 'strcmpi' but I think the best way is to add near h_export line 22 is this:-

Code:

#ifdef WIN32
#define strcmpi _strcmpi
#endif

Even though those alterations to the code didn't effect the VS2019 compiler as it gave less warning messages, but I cannot guarantee that it will work better for Windows Servers. Besides it was tricky and painful as Sandbot Linux had problems with the CXX ABI errors as having Sandbot not compiled with GCC/G++ 4.8 or earlier caused those CXX ABI errors. Due to the Steam Runtime Libs being outdated, unlike Sven Coop v5 that has most of the up to date libs and its own custom modified Svengine from GoldSrc.

Thanks - why remove -mmmx and -msse though? Are they implied by something else?
There's an init function that sets all those things that the constructor should set - it's a change I'll get around to sooner or later. There's plenty of messy and non-performant code that I want to fix but I've been concentrating on features for now (converting HBP Bot which was mostly C to C++ is still in progress).

Quote:

Originally Posted by The Storm (Post 67286)
The C++ runtime can be statically linked to the binary. This will resolve all problems with
the ABI. It will also increase the binary size of the final .so file but nowadays that is really not as issue.

Yeah I couldn't figure out how to do this last time I looked into it.

Quote:

Originally Posted by RoboCop (Post 67287)
@tschumann

Also I've been using the trial version of PVS Studio Analyser on SandBot and spotted a few performance issues here:-

I'm not sure about some of those changes - they may be possible but for safety I think the declarations are compatible with how the engine has them declared.

RoboCop 01-06-2019 18:07

Re: progress
 
Well I wasn't sure if adding MMX and SSE were necessary as well as adding too many opt flags as well as using -O3 could cause some adverse effects as well increase the build size. As for using like -march=pentium4 or higher may not be compatible with the old GoldSrc engine as it was released since 1997/1998 and maybe pushed to it's limit. Also some older compilers like GCC 4.8 appear to recompile those builds in a smaller size but won't have the latest C++14 nor C++17 standard features - if I am not mistaken.

The Storm 01-06-2019 21:03

Re: progress
 
@tschumann It's a bit tricky for GCC but not hard. Locate the 32bit version of libstdc++.a file on your system and copy it on the same location where your Makefile is, then add -L. to the linker flags. Thats all. :)

@RoboCop You've got it wrong about optimization flags. It does not matter if the engine is compiled with or without these flags, the only thing that matters is if the target CPU supports them. MMX and SSE are pretty common in modern CPUs and even in CPUs that are 10 years old. :) Of-course one should be careful with the newer revisions of these instructions such as SSE3 and SSE4.x as these are not available on the 10 years old CPUs.

Also -03 may increase the build size but it optimize much more on performance which is good. Modern HDDs are not 20MB so the size does not matter that much. :) However -03 is not recommended for legacy code base until all warnings that the compiler outputs on the highest warning level are not fixed(this does NOT include 3rd party static analyzers). That's because -03 is much more aggressive(but conforming) to optimizations and many bugs that are caused by code that is somewhat in the category undefined behavior(like signed integer overflow for example) will pop up. :)

tschumann 02-06-2019 12:44

Re: progress
 
Quote:

Originally Posted by RoboCop (Post 67289)
Well I wasn't sure if adding MMX and SSE were necessary as well as adding too many opt flags as well as using -O3 could cause some adverse effects as well increase the build size. As for using like -march=pentium4 or higher may not be compatible with the old GoldSrc engine as it was released since 1997/1998 and maybe pushed to it's limit. Also some older compilers like GCC 4.8 appear to recompile those builds in a smaller size but won't have the latest C++14 nor C++17 standard features - if I am not mistaken.

Yeah The Storm is right - it doesn't matter what the engine uses. Not sure how much of the instruction set extensions this sort of code would use though, or whether optimising for size or speed is better.

Quote:

Originally Posted by The Storm (Post 67290)
@tschumann It's a bit tricky for GCC but not hard. Locate the 32bit version of libstdc++.a file on your system and copy it on the same location where your Makefile is, then add -L. to the linker flags. Thats all. :)

Ah makes sense - thanks! When I went searching last year I really couldn't find any useful information.

The Storm 02-06-2019 15:52

Re: progress
 
Well, actually it does not makes sense, because the GCC compiler is always choosing the dynamic C++ runtime if it sees them both in the same directory, regardless of staticlib flags. This trick is just bringing the static file in the first search path, so the compiler have no choice but to use it. :)

tschumann 05-06-2019 13:15

Re: progress
 
Ah okay - that's probably why it didn't work last time.

tschumann 08-06-2019 13:43

Re: progress
 
Okay, a question for those who know g++ and Makefiles better than I do - where do I put -Wall -Wextra -Werror etc and have warnings get displayed etc? I tried putting them in various places but things which should have generated warnings (assigning 256 to char for example) did not.

The Storm 10-06-2019 22:03

Re: progress
 
If you are talking about that Makefile just add these flags to OPTFLAGS or directly in CPPFLAGS section. If you want to really get kinky you can also add the -pedantic flag. :D

tschumann 15-06-2019 07:40

Re: progress
 
Quote:

Originally Posted by The Storm (Post 67295)
If you are talking about that Makefile just add these flags to OPTFLAGS or directly in CPPFLAGS section. If you want to really get kinky you can also add the -pedantic flag. :D

I did, but I figured out why it wasn't working: the -w flag was being passed to suppress errors (this is also set in the Half-Life SDK).
I tried -pedantic but it was too pedantic (at least for now)!

The Storm 15-06-2019 12:53

Re: progress
 
Yeah, -pedantic is only for hardcore stuff. :D :D

Persephone 30-08-2019 07:35

Re: progress
 
Any progress? It has been a long time since last post and still no update yet 😐

I'm very interested with Sandbot. I hope this project hasn't been abandoned 😑

tschumann 30-08-2019 13:23

Re: progress
 
Not dead yet - I had to reinstall Windows last weekend (no idea what happened) which was a pain, and I still need to reinstall Steam, Visual Studio (will update to 2019), and a Linux virtual machine to continue development.
I've almost got a new release of Sandpit done which I want to put out soon too.

Persephone 02-09-2019 07:21

Re: progress
 
I'm glad to hear that. So it means sandbot is still in development.

C'mon man, I'm pretty sure you can improve your bot better, so I can play Opposing Force with 5 bots at once (HPB_BOT, jk_botti, Akimbot, Parabot, and of course Sandbot)

tschumann 05-09-2019 10:46

Re: progress
 
Yes, still in development - too many projects and not enough time.

Does Sandbot not work with other bots? I thought you showed screenshots of it before.

Persephone 07-09-2019 20:28

Re: progress
 
I don't remember if I said your sandbot doesn't compatible with other bots.

Look at this screenshot. HPB_BOT, jk_botti, and Akimbot can join with Sandbot without any problems. At least only Parabot which caused my game couldn't be started. If only the Sandbot's bot_count problem had been solved, I can play Opposing Force with it instead of Parabot

https://i.imgur.com/ooOnDhN.jpg

However.....

I just found something interesting. I don't know if Opposing Force multiplayer game can only up to 11 players max or not. But for some reason, if I set the number of bots playing to 3 for each bots, any Sandbot members will be "banished".

Check this screenshot for better explanation. You can see if John is the only Sandbot who is still playing in the map. Another Sandbot who join previously has been kicked because another bot has joined afterwards. There are 11 players in the map (3 HPB_BOT, 3 jk_botti, 3 Akimbot, 1 Sandbot, and of course myself)

https://i.imgur.com/ommjDO4.jpg

Well, what do you think? Do you want to continuing your Sandbot progress as soon as possible? :)

RoboCop 11-09-2019 13:59

Re: progress
 
Also I do wonder if it is possible for SandBot to run with another bot like ShrikeBot and self-learn by coping and analysing how ShrikeBot interacts and on capping?

Reason I asked is I'm currently helping and testing RealBot that can self-learn and doesn't clash with POD Bot or even YaPB as RealBots need to "observe" and watch how either human players or POD Bots interact and maybe avoid having to figure out how to import ShrikeBot or SturmBot waypoints into SandBot, rather than wasting too many time and effort remaking the fresh waypoints for SandBot for DOD 1.3.

I mean let's face it we cannot waste our time on having more and more waypoints manually made as well that not many players play on DOD 1.3 or even Op4CTF a lot nowadays.

Also I do know that not also that YaPB can use waypoints from POD Bot as it is compatible, but they also store experience data to try surprise and overwhelm their opponent's strategy by noting their preference on which routes or weapons they choose to prevent them flanking.

Of the problem is with bots that can only either using waypoints or .navs from CZ Bot, CSS Bot, CSGO as well as TF2 Bots, is not many players will find those bots appealing as they don't have the "common sense" such is experience or wisdom - which makes them less human like. Of course most of us know that HPB Bot is currently quite versatile as it can play over 6 HL1 Game Mods, but their performance and movement is too sluggish and lame, as well use too many Server CPU power and RAM.

Jeefo did some hard work and aggressive optimisations for YaPB to make it perform better than JoeBot, POD Bot and RACC - that YaPB can use waypoints as well as the exp data; that I've just elaborated.

So depending on the support or tests needed for SandBot it will take more of a longer progress to try achieve its goals and iron as many bugs as we can.

Persephone 11-09-2019 22:25

Re: progress
 
I have an additional info for you. For some reason, when playing with 4 bots at the same time (including Sandbot too), it seems Sandbot's appearance has an unique effect for another bots.

Look at this screenshot. They are just regrouping for unknown reason without attacking each other at all. Furthermore, all bots who normally great in battle, now they are just roaming around carrying weapon without shooting at other players.

https://i.imgur.com/sdtY08N.jpg

Due to this weird behavior, I can win the battle easier than usual. Because when Sandbot joins, another bots will become so uncompetitive than normally. For comparation, you can see this two results :

This is my battle result BEFORE Sandbot joins (you can see if our score has a little gap)

https://i.imgur.com/brQjDoA.jpg

And this is my battle result AFTER Sandbot joins (they were become mindless moron, I guess)

https://i.imgur.com/vtTdaVl.jpg


All times are GMT +2. The time now is 04:24.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.