Facepunch / sbox-issues

175 stars 12 forks source link

NPCs #765

Closed JanWerder closed 9 months ago

JanWerder commented 3 years ago

What can't you do?

There are no stock fully-featured NPCs in S&Box yet. Neither in the game nor in the code.

How would you like it to work?

The game should give the developer some guidance on how to handle NPCs. There are several implementations like in the AI Labs or in the NPC Zombie Horde gamemode, that are similar, but very basic. As a developer, I would like to add NPCs to my gamemode, but doing so would require me to take one of these templates and add a couple of features to it, that may later be unneccessary or obsolete due to an official implemenation of NPCs.

So the question would be: Will there be NPCs in the final game or will it stay the way it is now?

Geeknerd1337 commented 3 years ago

There is literally a whole gamemode developed by facepunch called AI labs which you can use to create advanced AI that uses the in-built navigation mesh. This issue should be closed. This literally exists, you just have to take the effort to make it fit your needs.

Fortune117 commented 3 years ago

He literally mentioned AI labs in his post, he's saying that some sort of base framework could be made. While I agree that a base framework for AI would be cool, that is not a priority for facepunch right now. The AI Labs code is a fine place to start, that's what I used for my stalker NPCs. You'll just have to put up with a limited base npc for now.

JanWerder commented 3 years ago

Alright, thanks for the answers so far. As mentioned I'm aware of AI Labs and using that as a base is fine of course. I just thought that a lot of other behaviours (attacking, teams, flanking, retreating to name a few) go into making a good NPC, a lot of which Half-Life already offers. So if S&Box would offer a NPC template, which is based on the standard source engine NPCs, a lot could be reused.

mattkrins commented 2 years ago

Just wanted to drop a +1 here. While the AI Labs is useful, for those new to developing AI/bots it will be a very steep learning curve to build a fully functional equivalent of say, a HL2 metro-cop (example only). Gmod had a plethora of NPCs for players to enjoy because it shipped with the base HL2 NPCs which could be modified to a degree. It would be great for s&box to have a basic AI framework at least several base NPCs which exhibit specific behaviors such as seeking/shooting/retreating as @JanWerder mentioned. Obviously the team is still working on higher priority base engine work right now, but i do believe this would be important to implement before an official release.