Is Proper Stealth Detection Possible in Game Builder Garage? (Simulating Raycasts)

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 44

  • @jJaeStudio
    @jJaeStudio 3 года назад +13

    This is an interesting way to simulate ray casting in GBG! Thanks for sharing.

  • @VideoDojoPro
    @VideoDojoPro 3 года назад +9

    ...Metal Gear Ray(casting)... 🥁

  • @jamespennington6428
    @jamespennington6428 2 года назад +1

    0:52
    Red: I saw somebody!
    Also Red: holup, lemme just ascend real quick…
    Blue: AAAAAA

  • @madollamike
    @madollamike 3 года назад +4

    This is amazing content. Even watching at half speed I’m having a hard time keeping up though! It would also be nice if you could briefly explain why you’re tweaking some settings such as the connection points, size, etc. if some of the sensors and whatnot. Good stuff!

    • @DaveNodon
      @DaveNodon  3 года назад +2

      Thank you so much for your kind words and feedback. I've definitely gotten a lot of comments on my speed - I guess I pushed things faster and faster because I don't want to waste peoples time but in the end if its frustrating that doesn't even matter! Working a lot more on pacing lately

    • @madollamike
      @madollamike 3 года назад +1

      @@DaveNodon Wow, you’re welcome! Thank you!

  • @CilantroGamer
    @CilantroGamer 3 года назад +2

    I've been trying to work on an FPS with hitscan weapons, and this has given me some ideas on refining it. Cool video!

  • @joshuaham1022
    @joshuaham1022 3 года назад +3

    I was able to spot a bunch of places where you could optimize by changing things like addition to map nodons. Or instead of having a counter go up to 60 and equal a constant you could start at -59 and go up to 1

    • @DaveNodon
      @DaveNodon  3 года назад +2

      Yes! Optimizations galore are possible. I like to keep things more easily "human readable" until I'm up against a wall and need the increased performance, but that might be a bad programmer habit!

  • @FMT7719
    @FMT7719 9 месяцев назад +1

    I soon as I saw stealth i clicked i love stealth games❤❤❤

  • @DualityCircuit
    @DualityCircuit 3 года назад

    WOAH this unlocks MANY POSSIBILITIES!!

  • @freezermakesmemes
    @freezermakesmemes 3 года назад

    Thanks for sharing this!

  • @lol-mw7zh
    @lol-mw7zh 3 года назад +3

    Cool! Here's possibly an easier / less costly solution: Player has a unique fancy object attached for each enemy. Those objects destroy spheres. Enemies have a cylinder sensor facing in front of them like a cone that detects only the player (another unique fancy object). Enemies also have launchers that shoot 1 projectile max, an invisible solid sphere that is destructible only by one of the fancy objects on the player, and the world. Make your world objects destroy spheres. When enemy cone sensor detects player, the launcher shoots the spheres in the direction they're facing (Z+ or whatever). Have a destroyed Nodon attached to each fancy object on the player. When it detects a sphere being destroyed by the fancy object, it activates the corresponding enemy detection / chase function. I think that should work?

    • @DaveNodon
      @DaveNodon  3 года назад +3

      If you build it out, I’d be happy to test it and see.
      I can see some possible issues, one being, in this one, we prevent the point(pencil) form physically touching the world, or else the slight impact jostles the objects around. I’m not sure if the invisible spheres would do that.
      The attached objects to player might bog down the movement, even if they’re un-solid or visible.
      You’d need something to point the launcher, or else it would only detect in a straight line, or if you made it big, it would catch on ancillary objects.
      You’d also need a unique fancy object ID for each enemy, and keeping track of all those could become a headache.
      Finally, this might actually end up saving nodon because I’m sure you can have multiple enemies using the same point, so there’s only one “detector” (as long as their visions don’t intersect(at which point if they must, you could probably add one more or as many are as needed only))
      It’s the kind of solution that you really have to build out to fine tune all the details, I’d love to see it.

    • @lol-mw7zh
      @lol-mw7zh 3 года назад +1

      @DaveNodon yeah I'd definitely need to build it to iron out any of quirks and issues that might exist like you mentioned.
      The spheres I guess would affect objects that are left movable, I guess I assumed the environment would be mostly static.
      The detection cylinder for the launcher should be able to be relatively wide since it's not solid and is only detecting the "player" (which can be an apple or whatever) so it doesn't matter what else it touches.
      The detection cylinder would just face the same direction as the enemy (whatever it's attached to) so I think that should be fine.
      Attaching multiple objects is always annoying yeah, I suppose you could just have a free slider moving a box that they are all attached to that is fed the X and Y location of the player so they follow without actually being attached. Not too expensive.
      Anyways your tutorials are great thanks for this one :)

  • @MewnoHimitsu
    @MewnoHimitsu 3 года назад +1

    Cool solution with circle in front of enemy. My thinking would be circle centered at enemy and check angle between enemy and character before teleporting object. I guess for the most part, your solution is sufficient.

    • @DaveNodon
      @DaveNodon  3 года назад +2

      The circle is really just to simulate the enemies’ area of awareness kindof like the cones in stealth games. We can only make circles 10x10x10 and if you centered it, he could only be aware within 5 units.
      If you wanted to ditch the awareness “cone” and do a more realistic, distance checking awareness that would be really cool too.
      Also checking the angle is exactly what we’re doing!

  • @imnotthatguy36
    @imnotthatguy36 2 года назад

    This is really good content and I an learning a lot form it. But it’s kind of hard to keep up with the video. In the future, maybe you should just slow it down a bit. Amazing content! 😁

  • @aidenmynyk8198
    @aidenmynyk8198 3 года назад

    Cool. This help with my ninja game

  • @ノーゲームノーワールド
    @ノーゲームノーワールド 3 года назад +1

    If the enemy is moving, the pencil firing angle will be incorrect.

    • @madollamike
      @madollamike 3 года назад

      The root of the issue doesn’t seem to be movement itself, but rather, changing direction from whatever direction the cpu was in when the game starts. Notice that it breaks if they move in a different direction, but then works again once they’re facing the original direction again.

    • @madollamike
      @madollamike 3 года назад

      When the cpu player turns, the cylinder turns with them on the Y hinge, but the calculation from the player sensors doesn’t accommodate for this and continues to calculate based on the original Y hinge position

    • @madollamike
      @madollamike 3 года назад

      Aha! The solution is to use an Angle Sensor! Replace the Constant Nodon at the 2:00 mark (the one in between the Position -> Angle and + -Inversion) with the Y axis port of an Angle Sensor attached to the cpu player.

    • @madollamike
      @madollamike 3 года назад

      Hmm but this still breaks if they start facing a direction other than Z-. Progress though!

    • @madollamike
      @madollamike 3 года назад

      Ok so apparently the Angle Sensor solution I mentioned above doesn’t work out of the box with the demo from the video. I had changed a few things before finding this solution and not sure what I did that makes this work. One major difference is that I changed the launcher to launch from X+ instead of Y+, so I’m guessing that plays a part in it.

  • @levibk9594
    @levibk9594 2 года назад

    Now we need to do is figure out how to simulate 3d ray casting

  • @FMT7719
    @FMT7719 9 месяцев назад

    I might be dumb but the cylinder wont point at me I followed your instructions but it wont. Even in 0.5x speed I couldn’t figure out what’s happening!
    I dont know if this is the same but I changed the constant value into a 0 and made connection point of cylinder from Y- > Z- to Y- > Z+

  • @the_elite_pichu7022
    @the_elite_pichu7022 3 года назад +1

    I have a question. For the follow the player code, How can you make it turn off and on at will? I’m trying to make a horror stealth game where it follows you if you are visible, but goes on a “search mode” if it can’t, where it moves around. If you know how to do that It would be most helpful. Thank you!

    • @DaveNodon
      @DaveNodon  3 года назад +3

      On my Better AI video, you can skip to 4:46 “Little Dave” part. The little Dave AI toggles following you when you press the R button. That should give you an idea, it’s only like a two minute clip and would show you step by step- but essential you add a multiply nodon before you plug the follow outputs into the following person.
      One of the inputs to the multiply can be a flag for example. If flag is on, it will multiply by 1 and keep the number flowing through it, if flag is off, it will squash the output and the follower won’t move.
      In the game code of the game ID that I share in that video there’s another more advanced AI called Feisty Dom, and he chases you when you press a button, but does a patrol otherwise!

    • @the_elite_pichu7022
      @the_elite_pichu7022 3 года назад

      That’s perfect, thank you so much

    • @Experiment-3087
      @Experiment-3087 3 месяца назад

      ​@@the_elite_pichu7022I know it's been three years and all, but I have another solution. (Probably not as good, but whatever) It needs a rotating head btw.
      Needed: Timers x2, Not, Random, Angle position, Flag, Calculators x2 (both on times), person nodon, and a constant.
      The constant is connected to a timer set for 4 seconds. (Can change, but it's finicky, like my old code) Then it goes into the office port of the flag nodon and into the not nodon. (The flag is connected to the not as well) The not nodon plugs into the second timer, set for two seconds. And is plugged into both of the multiplication calculators on the bottom port. The second timer is connected to the random nodon on the ? Port (make sure that you enter the settings of the random nodon and make it 360). The random nodon is connected to the angle position. Then the angle port on the top goes to the first multiplication port, and the bottom (or vertical position) goes to the top port on the second multiplication nodon.
      Finally, the top multiplication nodon goes to the forward and backward position and the bottom multiplication nodon goes to left and right part of the person nodon. (This makes the random movement, so basically part one or an NPC/random movement ai)
      "Part 2"
      To make them stop the randomized movement and chance you when you get close, it uses a touch sensor. (I need to update this, but if I do a raycast like shown above, I can't do multiple enemies) THESE STEPS ARE NOT A PART OF THE FIRST STEPS, IT MIGHT BREAK!!!
      Needed: -calculator x2, Xcalculator x2, location sensor x2 (set to world, always), touch sensor (center,center. On touch. Box. Person.) and another touch sensor. (For the head part, not necessarily, but if it goes back and forth... It looks like they're scanning the area. It's the same settings, but connected to z+, z- and detects a fancy object in the player) (one flag and one timer is required, but the time is up to how long the chase lasts before they give up).
      The second touch sensor goes into the on port of the flag, the timer is connected to the flag. When the timer runs out (or the output) it turns off the flag. The first touch sensor also turns on the flag, the one that detects the person and is center, center.
      There are two locations sensors, one is connected to the player, the other to the AI.
      The player location (X) is connected to the top port of the first - calculator, then the output is put into the top of the first X calculator. For the bottom of the first - calculator, it's the x position for the AI. (If you know how, it's the basic ai thing... You can skip ahead if you want, but it has a multiplication part you may want to pay attention to) And the bottom of the first X calculator is connected to the output of the flag. Copy this, but for the Z.
      The Z version is connected to the forward/backwards port, the X version is the left/right. Both are connected by their respective multiplication calculators.
      Boom, complete. Enjoy! (Sorry it's so long)

  • @BNERFART69
    @BNERFART69 3 года назад

    Dave nodon is very good

  • @BluShiGuy
    @BluShiGuy 3 года назад

    Nice

  • @squigzswitch8376
    @squigzswitch8376 3 года назад

    Nice solution! In the video your voice is a bit too low compared to the music/SFX during non-talking parts, while talking the music is just a tiny bit too loud. (Tested with headphones and bad speakers) If you change the balance in future vids they'll be perfect.

    • @DaveNodon
      @DaveNodon  3 года назад +1

      Yes, I knew it! I was using a new editing software and the audio controls are handled differently. I’m going to increase the audio ducking a bit more so the bgm gets decreased at a higher % during talking parts going forward. Thank you for pointing it out and confirming, I might’ve gone on thinking it was just me

    • @squigzswitch8376
      @squigzswitch8376 3 года назад

      @@DaveNodon Alright! I don't know the technical terms but it sounds like you know what to do. I'll give my impressions on the next video for comparison.

  • @Omega_Mart_Employee_K1Z
    @Omega_Mart_Employee_K1Z 3 года назад +1

    Nintendo hire this man!!!

  • @fatiyahe
    @fatiyahe 3 года назад

    smuggle cats into dogtopia

  • @BNERFART69
    @BNERFART69 3 года назад

    I think I ask for this?

    • @DaveNodon
      @DaveNodon  3 года назад +1

      Did you? 😆 I guess I have to change that in the description then.

    • @BNERFART69
      @BNERFART69 3 года назад

      Nah

    • @BNERFART69
      @BNERFART69 3 года назад

      The tutorial is like I AM SPEED

  • @leesaa5180
    @leesaa5180 2 года назад

    It’s too fast!