Page 2 of 10

Re: [REPLAN] ζetaBots: The ZScript Bot

PostPosted: Sat Mar 10, 2018 12:14 pm
by Rachael
If the bots are programmed properly, using player structures rather than being actual actors, themselves, yes.

Re: [REPLAN] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 15, 2018 12:27 pm
by scalliano
Does this mean that bots could potentially be used as enemies/allies in SP/co-op?

Re: [REPLAN] ζetaBots: The ZScript Bot

PostPosted: Mon Mar 26, 2018 8:13 pm
by Gustavo6046
I figured it was answer/update time. Okay, here we go:

Rachael wrote:You should probably know that GZDoom currently has plans to ditch its internal bot system completely and use ZScript for its bots, sometime in the future. This is one of the projects I was thinking about when that hit the planning phase, but I don't know if you are interested.


Well, I am interested in helping with the pathing and with relating the bot movement with how a human would act in a certain circumstance.

Dark-Assassin wrote:Any chance that a system like A* could be used instead? This would have to account for line actions and such too.


It currently uses a sort of A* in the pathing algorithm. Line actions are counted via path nodes (no navigation mesh pls).

scalliano wrote:Does this mean that bots could potentially be used as enemies/allies in SP/co-op?


Probably, but it has to be simple maps. Doors will be trouble (I'm still trying to figure out how to get a non-player pawn actor to Use a door or a lift!)

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Tue Mar 27, 2018 11:26 am
by TheRailgunner
I take it it's prohibitively difficult to devise some way to essentially trick GZD into thinking the bot is providing genuine player inputs to a controlled playerpawn? Is it even possible?

Zetabots interests me because of the potential for far superior monster AI - things like cover, limited pursuit, drawing fire, evasive actions, smarter pathfinding, etc., mostly because Doom's basic monster behavior (rush directly in the direction of the player, even if totally obstructed or blocked despite the clear presence of an open path to the player because they cannot draw or remember a path to their targets) is trash and not immersive after 25 years.

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Tue Mar 27, 2018 4:08 pm
by Gustavo6046
Maybe with some engine modification, which, given GZDoom's complexity, might be a bit difficult to do. I'd have to
  1. draw a line from Actor to UseRange units at its front,
  2. find all linedefs that intersect with this line,
  3. if this linedef is an Use line, has an action, and can be used by the actor (perform common Use line checks), then perform that action.

That might also be doable with ACS: an array of line actions. Since ZScript can access DECORATE functions, it can access ACS_Execute, and therefore execute a specifically-numbered script. The problem would be finding the linedefs that are in front of the actor, and getting their special - I fear that might not be doable without C++ work (intensive russian labor 24/7 for 5 years).

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Wed Mar 28, 2018 5:03 am
by Marisa Kirisame
Alternatively I can just export P_ActivateLine to the ZScript side and it would allow bots to "press use" on them. Finding the line in front of an actor is as simple as running a trace (cool new thing in 3.3 btw) and checking for usable lines (while aborting if a "block use" line is found).

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Wed Mar 28, 2018 4:43 pm
by Gustavo6046
Exactly, Marisa. That would be something really easy if a line (with index, not tag!) could be activated separately. The map should be more exposed to the ZScript modders (the BSP tree would then be discarded?) so that I can also work futurely in a pseudo-roguelike project.

I also have a simple, rough, and very coarse roadmap:
Image

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Wed Mar 28, 2018 11:29 pm
by Nash
The devs have already mentioned the intention to scriptify the internal bots... why not work together with them to perhaps phase out ZCajun in favour for your completely re-written bots? You'll get better tools to work with due to the project being engine-side too...

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 12:57 am
by Rachael
My idea was to make the implementation work a lot like the ZCajun ones do but better. Using player inputs so they can be recorded in demos. Gustavo and Marisa both mentioned making the bots follow pathing nodes - I personally think they should talk to one another and see if their goals align well enough that they can work together.

That being said though, if their goals are far enough apart we'll just have to settle for "bot classes" so to speak - i.e. one set of bots following one bot class, and one bot set following another, etc. If done right, both could easily become official... Either way, anyone who uses bots would probably love to see the dated ZCajun implementation gone.

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 11:16 am
by TheRailgunner
Rachael wrote:My idea was to make the implementation work a lot like the ZCajun ones do but better. Using player inputs so they can be recorded in demos. Gustavo and Marisa both mentioned making the bots follow pathing nodes - I personally think they should talk to one another and see if their goals align well enough that they can work together.

That being said though, if their goals are far enough apart we'll just have to settle for "bot classes" so to speak - i.e. one set of bots following one bot class, and one bot set following another, etc. If done right, both could easily become official... Either way, anyone who uses bots would probably love to see the dated ZCajun implementation gone.


Is it possible to effectively replace a monster with such a bot? Apart from the need to essentially turn them into player actors so they can use the ZetaBot system, it doesn't seem unrealistic, and I certainly hope it's a realistic possibility (you mentioned having the bots talking to each other and cooperating based off of their objectives - actually a decent step beyond my initial hopes). At least, I hope so - I'm not going to pretend I understand much of how this works or why, but Zeta seems very, very promising.

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 11:40 am
by Marisa Kirisame
By the way, if we're to integrate this officially, I think a more proper way to have bots understand how and when to use weapons and items would be to add rating/desirability virtual functions to them like Unreal/UT does.

Re: [70%] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 12:06 pm
by Gustavo6046
What a coincidence!

I had UT99's bots and weapon system in mind when I designed this, since I wrapped the Doom weapons in a Zeta Weapon module (which means they can be fired and rated from any actor shooter to any actor target), and that includes RateSelf and AltRateSelf.

I have no plans to add Heretic support right out - I want to first make the bot avoid walls and obstacles (which is being a task slightly harder than I expected). Hexen will be a little difficult, since it involves multiple classes, but that should already work (since I support multiple player classes). Another difficulty will be adapting the available modules to the current IWADs and maybe even loaded mods - since currently these are stored in a CVar, that should not be an issue, since CVars are specific to a game; the problem is to set them in CVARINFO for these IWADs).

Either way, welcome to Alpha!

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 1:22 pm
by Melodica
I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 3:39 pm
by Gustavo6046
Melodica wrote:I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?

I think I updated it now, do you think it works now?

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

PostPosted: Thu Mar 29, 2018 3:45 pm
by Melodica
Gustavo6046 wrote:
Melodica wrote:I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?

I think I updated it now, do you think it works now?


Still gives the same error. Maybe try to upload it to a different site?