Making an Enemy AI for my Horror Game in Godot (godot 3.X)

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 39

  • @wandering_wolf_dev
    @wandering_wolf_dev 2 роки тому +24

    There are two helper functions already built into Godot that do the global - local conversion for you when raycasting - to_local() and to_global() so you can just type raycast.set_cast_to(to_local(global_position)). Anyway thanks for the tips in the video!

    • @leonstansfield
      @leonstansfield  2 роки тому +9

      Awesome tip! I am actually using this now, its a lot cleaner - didnt even know the to_local() function was a thing! Thanks a lot man!

  • @Grdtrm
    @Grdtrm 2 роки тому +6

    I would have made the Enemy state an enum rather than a number of bools, but that does mean you couldn't have the enemy be in multiple states at once.
    Great video as always!

    • @leonstansfield
      @leonstansfield  2 роки тому +2

      Thats true... when it comes to programming I am not super clever

  • @twomur_
    @twomur_ 2 роки тому +1

    the AI is really cool i think you did a really good job with it and it’s something i’ve always wanted to tackle for a game! you’ve really inspired me keep it up with this game i think it could be really cool

  • @_williamparsons
    @_williamparsons 2 роки тому +2

    Looks like an iron golem :) will be cool to see how this turns out

  • @zestydev_
    @zestydev_ 2 роки тому

    This was really helpful for me because I have spent the last week trying to make some sort of basic AI in unity with minimal success

  • @Kyjor_
    @Kyjor_ 2 роки тому

    Nice job on this. Easy to follow and a nice breakdown on the ai

  • @kalebyee
    @kalebyee 2 роки тому

    Nice video there! Very entertaining and helpful.
    The only thing I would change is the booleans for the states. Each boolean costs the same amount of memory as an int, so you could use an enum to change between states to optimize the game flow. Since you are doing a simple state machine it is just a matter of using "match" for the change between states.

    • @leonstansfield
      @leonstansfield  2 роки тому +3

      Your absolutely right. I have no professional training in programming so I had no idea they existed, but now I do it's something I would improve!

  • @Foxcoder
    @Foxcoder 2 роки тому

    awesome, nice video, and well explained, keep it up with your great work

  • @Benjabenjaaaa
    @Benjabenjaaaa 2 роки тому +1

    Great video! Only problem I have is that gradient bg has a way to blurry transition looks like something made with Pixlr or gimp or something. The rest of the video is good thoe

  • @Gureenu
    @Gureenu 2 роки тому

    i like your style, keep it up.

  • @monstereugene
    @monstereugene 2 роки тому +2

    epic.. will definitely communism these ideas if I need to build something simular

  • @USER-ZB2YT
    @USER-ZB2YT 5 місяців тому

    Hey, do you have a discord server or a community server on any other platform for exchanging godot advice?

  • @godofdream9112
    @godofdream9112 Рік тому

    you are one of the best godot channel.... here is the thing, I want to make vice city type of open world game, not big not too small... I did not found any good work flow for big 3d level design (more like terrain desine).... I can certainly make the map in blender, but its too awkward. can you help me ? thanks

    • @leonstansfield
      @leonstansfield  Рік тому

      I tend to focus on the programming side of things rather than level design. There are some great resources on GDC about level design processes and how some studios approach world and level design though!

  • @Dykler1
    @Dykler1 2 роки тому

    Nice! Btw, how did you come up with that cone collider? I didn't see an option for it in Godot

    • @leonstansfield
      @leonstansfield  2 роки тому

      I actually had to make the collider myself, there is an option for custom collision shape where you can enter an array of coordinates.

  • @tomtintenfisch8029
    @tomtintenfisch8029 2 роки тому

    a good option for a state machine are enums

  • @frankoesavage8314
    @frankoesavage8314 2 роки тому

    do you mind showing me the func move_to_target()? Im trying to figure out how to make ai move

    • @leonstansfield
      @leonstansfield  2 роки тому +2

      Yeah, the code can be found here:
      github.com/LeonStansfield/godot-starter-kit/blob/main/Enemy_AI/Scripts/Enemy.gd

    • @frankoesavage8314
      @frankoesavage8314 2 роки тому

      @@leonstansfield Hey , thanks man! I really appreciate that

  • @trickybrawl2754
    @trickybrawl2754 2 роки тому

    Make a tutorial about moving character and how to make that...you will get a lot of likes

  • @nelsonmuando6526
    @nelsonmuando6526 2 роки тому +2

    give me script

  • @drakewahl7609
    @drakewahl7609 2 роки тому

    How would you prevent the enemy from seeing you through walls?

    • @leonstansfield
      @leonstansfield  2 роки тому

      the raycast will return the name of the object it hits first, so if a wall is between the enemy and player it will not see the player.

  • @Rushi-q9o
    @Rushi-q9o 5 місяців тому

    Is this code private?

  • @thatoneguyyouforgotthenameof
    @thatoneguyyouforgotthenameof 2 роки тому

    Attempt to explain to a gen Z kid what the title means

  • @astroshipt4261
    @astroshipt4261 Рік тому +1

    didn't really helpful :/

  • @Benjabenjaaaa
    @Benjabenjaaaa 2 роки тому +1

    First