Wolf3d Haven Forum

Please log in or register. Smile

Join the forum, it's quick and easy

Wolf3d Haven Forum

Please log in or register. Smile

Wolf3d Haven Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


2 posters

    How to make a Protagonist AI/Actor?

    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    Location : subterranean caverns & catacombs
    Job : Entrepreneur
    Hobbie : Beach Days & Gardening
    Message : Author of Castle Erzengel Demo, and the upcoming Runes of North Castle Court, and the rest of the Series : Knights of the ᛋᛋ.
    Registration date : 2021-12-05

    How to make a Protagonist AI/Actor? Empty How to make a Protagonist AI/Actor?

    Post by Agent_Falcon93 Sat Aug 19, 2023 9:43 pm

    I imagine this might be a doozie to code, but it would help with the storyline and gameplay in the beginning levels of my first full game, though of course it could be without it. 
    Anyhow, does anyone know how to make an actor with full rotations that attacks the other enemies, and does not attack the player, and which friendly fire would not harm, and possibly just maybe tries to stay in your general proximity, like a team mate would in combat. 

    I thought I had seen a post about something similar but I just looked here and DHW and don't see it/anything similar. 
    You would be credited, hell I'll even make an easter egg statue of you/your chosen avatar/image, since this seems to me like such a big request.



    How to make a Protagonist AI/Actor? Right-arrow



    How to make a Protagonist AI/Actor? Right-arrow farao "Call Pizza Hut and say Ardwolf"  How to make a Protagonist AI/Actor? 1f355
    SilverWolf
    SilverWolf
    Wolf3d n00b
    Wolf3d n00b


    Other / Decline to state
    Number of posts : 5
    Age : 16
    Registration date : 2023-07-22

    How to make a Protagonist AI/Actor? Empty Re: How to make a Protagonist AI/Actor?

    Post by SilverWolf Sun Aug 20, 2023 7:47 am

    Maybe you could use the AutoWolf code as a base, and change it so that it controls something other than the player, and stays within a certain amount of squares as the player
    https://wolf3d.darkbb.com/t2411-automatic-wolfenstein-new-port-for-wolf3d

    It probably won't be easy though as there's a lot of parts of the code that need to be understood to work together. Maybe combining it with linuxwolf's code for SplitWolf (which has code for spawning many players built-in) would be easiest
    https://wolf3d.darkbb.com/t3491-released-splitwolf-1-0

    Have you played Ken's Labyrinth? In Episode 1 you have to save your dog Sparky, and in Episode 2 Sparky follows you around everywhere. Sparky doesn't attack anyone, and if you accidently shoot Sparky he just barks at you, but it's quite a funny thing to watch
    http://www.advsys.net/ken/klab.htm

    Agent_Falcon93 likes this post

    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    Location : subterranean caverns & catacombs
    Job : Entrepreneur
    Hobbie : Beach Days & Gardening
    Message : Author of Castle Erzengel Demo, and the upcoming Runes of North Castle Court, and the rest of the Series : Knights of the ᛋᛋ.
    Registration date : 2021-12-05

    How to make a Protagonist AI/Actor? Empty Re: How to make a Protagonist AI/Actor?

    Post by Agent_Falcon93 Sun Aug 20, 2023 7:54 am

    I just looked again and found one thread that went nowhere and this one that while not being solved had some interesting and insightful discussion on the matter, 

    http://dhw.wolfenstein3d.com/viewtopic.php?t=372&postdays=0&postorder=asc&&start=30

    a few important factors I recognized are :

    Any actors engaging each other in combat must 
    A - be programmed to recognize and attack each other, and I think need some system to prioritize targets. 
    B - Have 8 directions of attack frames 
    B - If they can die can from each others attacks then they need 8 directions of death frames. 

    I phrased those takeaways as such because of their discussion on the thread and my own reasons as follows,

    A - I could see big problems like crashes or bad bugs and bad loops without a target priority system.
    B  - is self explanatory 
    C - I like the idea that was stated by unknown "Guest", the level fails if you allies die, that add gameplay challenge, adds to the sense of mission and duty to your brothers in arms, and saves allot of extra code and graphical work, which honestly I would rather do less of for this game and maybe deal with later on for another installment. 

    And I the reason I say "Any actors engaging each other" is because I just want this for a few levels in this game, just in the beginning few levels and maybe here and there in some other levels where I can put blocking tiles to keep the buddy bots isolated to, so that way I only need say 4-7 different actors to have the code and graphics to fight each other because they wont be in most levels. 
    ie 2-3 enemy types, 2 buddy bot types (also 1 or 2 friendly unarmed AI that just follow an escape route).


    Last edited by Agent_Falcon93 on Sun Aug 20, 2023 8:11 am; edited 1 time in total (Reason for editing : typos and update for clarity)



    How to make a Protagonist AI/Actor? Right-arrow



    How to make a Protagonist AI/Actor? Right-arrow farao "Call Pizza Hut and say Ardwolf"  How to make a Protagonist AI/Actor? 1f355
    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    Location : subterranean caverns & catacombs
    Job : Entrepreneur
    Hobbie : Beach Days & Gardening
    Message : Author of Castle Erzengel Demo, and the upcoming Runes of North Castle Court, and the rest of the Series : Knights of the ᛋᛋ.
    Registration date : 2021-12-05

    How to make a Protagonist AI/Actor? Empty Re: How to make a Protagonist AI/Actor?

    Post by Agent_Falcon93 Sun Aug 20, 2023 8:00 am

    SilverWolf wrote:Maybe you could use the AutoWolf code as a base, and change it so that it controls something other than the player, and stays within a certain amount of squares as the player
    https://wolf3d.darkbb.com/t2411-automatic-wolfenstein-new-port-for-wolf3d

    It probably won't be easy though as there's a lot of parts of the code that need to be understood to work together. Maybe combining it with linuxwolf's code for SplitWolf (which has code for spawning many players built-in) would be easiest
    https://wolf3d.darkbb.com/t3491-released-splitwolf-1-0

    Have you played Ken's Labyrinth? In Episode 1 you have to save your dog Sparky, and in Episode 2 Sparky follows you around everywhere. Sparky doesn't attack anyone, and if you accidently shoot Sparky he just barks at you, but it's quite a funny thing to watch
    http://www.advsys.net/ken/klab.htm


    OO cool Thanks! 
     I will look into those, my code base is heavily modified and customized so I cant use them as a codebase in the sense of modding off them as a base but I will look at their sourcecodes and glean insight.



    How to make a Protagonist AI/Actor? Right-arrow



    How to make a Protagonist AI/Actor? Right-arrow farao "Call Pizza Hut and say Ardwolf"  How to make a Protagonist AI/Actor? 1f355
    Agent_Falcon93
    Agent_Falcon93
    Can I Play, Daddy?
    Can I Play, Daddy?


    Male
    Number of posts : 39
    Age : 37
    Location : subterranean caverns & catacombs
    Job : Entrepreneur
    Hobbie : Beach Days & Gardening
    Message : Author of Castle Erzengel Demo, and the upcoming Runes of North Castle Court, and the rest of the Series : Knights of the ᛋᛋ.
    Registration date : 2021-12-05

    How to make a Protagonist AI/Actor? Empty Re: How to make a Protagonist AI/Actor?

    Post by Agent_Falcon93 Sun Aug 20, 2023 8:04 am

    I also want to make some actors that just follow their own directional markers to escape and you must defend them. 
    If I can hack the defendees and the brothers in arms actors I will put a tutorial up, but anyone with insight please give your two cents, this is a doozie.



    How to make a Protagonist AI/Actor? Right-arrow



    How to make a Protagonist AI/Actor? Right-arrow farao "Call Pizza Hut and say Ardwolf"  How to make a Protagonist AI/Actor? 1f355

    Sponsored content


    How to make a Protagonist AI/Actor? Empty Re: How to make a Protagonist AI/Actor?

    Post by Sponsored content


      Current date/time is Mon Jun 17, 2024 7:48 am