eukara / freecs

Clean-room Counter-Strike 1.5 in QuakeC, using Nuclide SDK. Previously known as OpenCS! (2016)
ISC License
183 stars 16 forks source link

Bot Support #1

Closed HeteroChromia420 closed 3 months ago

HeteroChromia420 commented 3 years ago

Hi there.

Really interested in following the Development of this project (and the other Free* Projects), though there is a question on my mind which is Bot Support (which i argue it's somewhat important for the multiplayer-only titles). will that be worked on eventually?

eukara commented 3 years ago

Progress is already happening on that front :) In FreeHL you can play with bots properly on most maps, granted there's only plain deathmatch implemented at this point. Via console you can add some mindless bots in FreeCS too, that currently do not follow game-rules via 'sv bot_add'. All of it is handled fully by BotLib, which is part of the Nuclide SDK base. I'm currently engineering it in such a way that simple games like HL:DM don't need any game-specific programming. For games like CS we do really need extra game-logic to handle game-rules and things such as buying weapons.

Before I get to writing the game-specific code, I do want to tackle some other issues that plague 'simple' games like Half-Life inside BotLib - such as scripted events such as the nuke in crossfire.bsp being handled with at least some awareness. This logic would then be applied for similar situations in CS as well.

Other than that, the only thing that's really missing is proper team-play awareness and waypoints - lots of them. Documentation on how to use the waypoint editor (way_menu in console) is coming.

Thanks for your interest!

atomGit commented 1 year ago

hey @eukara - i'm wondering if you've made further progress regarding bot support

i have very fond memories of HLDM and CS before Steam and Valve's acquisition of CS and am looking forward to your project becoming more mature - i've been keeping an eye on it for some time and am happy that you haven't yet become bored with it

i really wish i could contribute but my coding skills are extremely limited

eukara commented 1 year ago

They bots are able to do more, but not strictly anything specific to Counter-Strike. They are able to take and capture items in games that have a mode skin to CTF. I will be extending this soon to encompass more. The major work is done in the upstream Nuclide repository since that'll benefit all games.

Thanks for your interest, it does mean a lot to me personally. A lot of this is retracing steps of teams I look up to. I learn new things about these games all the time as a result, it never gets old.

However, it does not feed me, so I have to do other things to keep me alive. The progress can sometimes feel a bit slow as a result. So far everyone has been understanding of that and I thank those that are patient.

I'll update this Issue over time as I improve the overall bot AI in a meaningful capacity going forward.

atomGit commented 1 year ago

Thanks for your interest, it does mean a lot to me personally.

you are most welcome :)

i spent a lot of time with CS back in the day and met some very cool people and content creators so i can understand your extended interest in it

on another note, what is the server end of all this looking like? do you envision the ability to run public servers?

eukara commented 1 year ago

what is the server end of all this looking like? do you envision the ability to run public servers?

You can already host servers if you really wanted to, but there's no easy upgrade path for non technical users. There is a lot of work that needs to be done to make the set up a lot more convenient.

Early on in development I made the mistake of having a Discord server and I was so busy answering questions, helping people and being a public face that it took time away from everything else. It's a tough balance and I've hesitated marketing all this as a result. It's cool to see people from all walks of life come across it and wondering what the heck it's all about though!

atomGit commented 1 year ago

i may have brought this up too late and it may not be doable at all, but i was wondering if bots could be "trained" via waypoints that were logged by the player during a game rather than having to create waypoint files - this of course assumes that that a players path could be logged and, far as i know, it is

eukara commented 1 year ago

It's definitely possible to write such a thing. I know generating waypoint files is an inconvenience for a lot of players and I've been thinking about ways of triangulating that info automatically. That approach would probably not work well for CS as most entities are placed few and far between (generally focused around the spawnpoints) and some maps don't even bother with anything but spawnpoints. In those cases I may have to push some dummy entity around to generate some valuable movement data.

I also would like to have means of converting PODBot waypoint files over. Maybe even the NAV grid stuff in Condition Zero could be retrofitted in some way - I haven't tried to peek at either formats.

The problem with capturing just player input means that there's a lot of cleaning up to do. For the most efficient pathfinding you want as few nodes as possible. Thus we'd need a pretty sophisticated cleanup algorithm which I dread to think about implementing...

siredmar commented 11 months ago

@eukara I'm no expert, but providing a thin translation layer for the Pod interface could be at least worth the effort, what do you think? Being more compatible, the user could decide which Bot to choose.

Available bots i found so far:

eukara commented 3 months ago

Since then, we've got more usable bots, and a command to convert PODBot waypoints to native Nuclide ones!

For example: sv way loadpb somefile.pwf