Player-vs-AI Games (JavaScript tutorial)

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 62

  • @autozone5335
    @autozone5335 9 місяців тому +5

    A bomb of awesomeness just exploded !

  • @M4rt1nX
    @M4rt1nX 9 місяців тому +1

    Omg, I love this. Thank you Frank!!
    When you read AI you think on big models, but it is always a joy to know that we build custom AIs for the projects.
    I'm very happy as well that you are implementing more user menus and UI in the projects.

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      Hi. Yea. AI used in games since the 80s is not the same exact thing as machine learning and language models. It can be quite simple actually as I show here

  • @worldbest3097
    @worldbest3097 9 місяців тому

    i actually memorized all script from Franklab. it helped me to refactor other youtuber's game code into my own way(frank's style). Your contents is really freaking great and teach me way to how to catch fish! I really appreciate!

  • @AlAmin-un7zx
    @AlAmin-un7zx 9 місяців тому

    You are awesome Frank. We love you. Thank you for the tutorial.

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому

      Thank you. Very happy to read this comment ☺️

  • @Radu
    @Radu 9 місяців тому

    Amazing how you are able to teach such polished projects. I don't have the patience... Are you doing these for your actual work or just to teach on UA-cam?

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      Your projects are even more elaborare. I cant even imagine how much work you put into your last course. I do it just do it for fun. I need to find a job where they would pay me for these haha

    • @Radu
      @Radu 9 місяців тому

      @@Frankslaboratory some of my code-bases are quite big, but the end result doesn't really look like an 'end-product' in any of them. I mostly focus on the learning experience.

  • @braveitor
    @braveitor 9 місяців тому +1

    Great tutorial. Lots of great stuff there. Even the game seems fun. Thank you.

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      Hi, yea there was a lot of stuff to cover, I think people might prefer shorter classes.

    • @braveitor
      @braveitor 9 місяців тому

      @@Frankslaboratory Well, I'm more into React and Javascript frameworks nowadays, so when I see lot of staff that could be coded as components, or even separate classes, I can see the advantage in organization using that modular code, but I always learn something now with your tutorials. :)

    • @douglascounts4634
      @douglascounts4634 9 місяців тому

      @@braveitorWell, you will not find React very useful for canvas drawing as it isn’t changing the DOM. You could wrap up the entire project into a single React component though where the canvas element is inside a React component. It might generate many DOM updates that way though. So you would have to work around that.

    • @braveitor
      @braveitor 9 місяців тому

      @@douglascounts4634 Yes, you are right. I meant that those concepts of reusable components are really useful as they avoid to write time and time again similar code. In this case maybe using several classes (for players, objects, even controls...) could make the code much readable, organized and expandable. :)

  • @karlkoch3345
    @karlkoch3345 8 місяців тому

    Yet another amazing learning experience, big fan of Franks Laboratory! Go Void Wolf! Thanks Frank!

    • @Frankslaboratory
      @Frankslaboratory  7 місяців тому

      Good to see you here Karl, thank you for your kind comment

  • @novaprice9099
    @novaprice9099 2 місяці тому

    Dude you are really an awesome teacher.

  • @ericfourmaux833
    @ericfourmaux833 9 місяців тому

    Very good tutorials, as usual! Love your chanel! :) I'd love to see a platform game tutorial with scrolling! :) Great work Frank! Thank You!

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      I want to remake some classic arcade games lime Megaman or the original Mario but need to find a good way to teach tile maps to make the levels decent size

  • @atandatosinpeter427
    @atandatosinpeter427 6 місяців тому

    I made it! One concern, though, is that, I have to set eventInterval in game class to 120 to work smoothly on devices of 2GB RAM which makes the snakes' movement faster than I want. Is there a way to fix this?

  • @javifontalva7752
    @javifontalva7752 8 місяців тому

    I would like to watch a tutorial about how to create these beautiful images.

    • @Frankslaboratory
      @Frankslaboratory  7 місяців тому

      I would love to do it but the way UA-cam works it's not allowed, algorithm... :D

  • @MeinDeutschkurs
    @MeinDeutschkurs 7 місяців тому

    Why responsiveness, if touch is completely ignored? Yes, different screen sizes on Desktops. My stats show that 85% use mobile devices nowadays. I think touch controls are a must. And a pain to implement properly.

    • @AyoubNachat-wm4no
      @AyoubNachat-wm4no 7 місяців тому

      actually its easy, you can just declare a variable that will contain the clicked button (keyboard or html buttons showed for mobile users) and the remap to the game action.
      if you want touch support for your game instead of html buttons to register your game actions you may already find a library that register touch events instead of implementing it yourself.

    • @MeinDeutschkurs
      @MeinDeutschkurs 7 місяців тому

      @@AyoubNachat-wm4no I figured your that this is not enough. Unfortunately, iOS, iPadOS, Android, with or without keyboard inputs. There is lots to consider. In worse case, multiple inputs are triggered. Viewport behavior… It‘s a mess if you want to be compatible with several inputs and or platforms.

    • @AyoubNachat-wm4no
      @AyoubNachat-wm4no 7 місяців тому

      @@MeinDeutschkurs it's game that runs in the web what does the OS have to do with compatibility?

    • @MeinDeutschkurs
      @MeinDeutschkurs 7 місяців тому

      @@AyoubNachat-wm4no interface behavior. Just try to implement the inputs for any game on all platforms.

    • @AyoubNachat-wm4no
      @AyoubNachat-wm4no 7 місяців тому

      @@MeinDeutschkurs i was only talking about devices that have a browser in them, and since the game controls are in the browser environment (a simple html button that fires an onclick function) everything is going to work good.

  • @javifontalva7752
    @javifontalva7752 8 місяців тому

    When can we see a platform game in javascript? Just an idea.

    • @Frankslaboratory
      @Frankslaboratory  7 місяців тому

      I will do a platformer for sure, my favourite type of game, after tower defense I guess :D

  • @bramtea5790
    @bramtea5790 7 місяців тому

    Love this👍, Thank you!!

  • @silentworldsound
    @silentworldsound 7 місяців тому

    wow, this video is very helpfull for learning js, can you please make bubble shoter game in js?

  • @kiranpatel3753
    @kiranpatel3753 9 місяців тому +1

    Hey frank.. I actually wanna share some of my codes with u so how can i?... Btw amazing video 👌👌👌

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      You can email me, I respond to all email but it might take me a while

  • @fredl9815
    @fredl9815 9 місяців тому

    Thanks a lot for your tutorial.
    I have a technical question, is the canvas suitable for games in terms of performance?

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому

      Hi, yes canvas is made for handling graphics, it is good for performance. With more complex games it depends on how you write and optimise your code, same as any other language.

  • @leolopezdev
    @leolopezdev 4 місяці тому

    This looks nice thanks.

  • @king_lel_HD
    @king_lel_HD 9 місяців тому

    OMG new Video 😍😍

  • @melodydrase
    @melodydrase 8 місяців тому

    thanks frank 👍👍👍

  • @ankushvishwakarma5074
    @ankushvishwakarma5074 9 місяців тому

    Pumped up🎉🎉

  • @rathanveerarts
    @rathanveerarts 7 місяців тому

    Supper nice 🎉🎉

  • @javifontalva7752
    @javifontalva7752 8 місяців тому

    Wow Impressive!!!

  • @NoobOp-p9g
    @NoobOp-p9g 9 місяців тому

    🔥🔥🔥

  • @playmambo9573
    @playmambo9573 9 місяців тому

    Wow!!!! Thank you!!

  • @naomiorinahsule3422
    @naomiorinahsule3422 7 місяців тому

    Make a pacman game

  • @worldbest3097
    @worldbest3097 9 місяців тому

    damn, today!!! lol

  • @crispendragon1139
    @crispendragon1139 9 місяців тому

    thanks! You are the best. More videos like this please!!!

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому +1

      Glad you found some value

    • @crispendragon1139
      @crispendragon1139 9 місяців тому

      @@Frankslaboratory thanks to you so much. I learned so much from you Greetings and Blessings from Chile!

  • @philliplam2704
    @philliplam2704 9 місяців тому

    Holy crap you are a god

    • @Frankslaboratory
      @Frankslaboratory  9 місяців тому

      It's a simple game, it just has more parts than what I usually do. Trying to see what people prefer