JavaScript Game Tutorial - Final Polish

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

КОМЕНТАРІ • 51

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

    Part 1: ua-cam.com/video/c-1dBd1_G8A/v-deo.html

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

    I was just watching part 3 and 4 again of this series to really capture the information. Saw this fresh of the print, you're really cranking these out. Thank you so much for the dedication, waiting for the Udemy course to buy and contribute some more to your hard work.

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

      Hi, glad to hear, hope you found some value and thank you for your support. I will just do one more episode and move on to other projects I think :D

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

    So many small details... I feel they easily get overlooked in games, but without them, the games just wouldn't be the same. Nice work! You sure have a lot of patience!
    Oh, and mind-blown that the array length in JavaScript can be set like that. I had no idea :-|

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

      Hello sir !!!! I m a big fan of your videos !!!!!

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

    I really love your content.. keep going man!

  • @John-mv6gs
    @John-mv6gs Рік тому +1

    Hey Frank, first I want to say thank you so much for these videos and all of the time and energy you put into them. I have gotten a lot out of them! I just wrapped up this full game tutorial and one question I have is why you do not calculate player movement speed with deltaTime? You provide great explanation for why it is needed for animations and normalizing their speed across machines, but would you not need to do the same for movement speed? Thank you!

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

      Hi, yes you are right, ideally the entire animate loop so all the code should be timed to get consistency. I do it in most of my new classes, for some reason I didn't do it here, but I should have done.

    • @John-mv6gs
      @John-mv6gs Рік тому

      no worries. thank you!@@Frankslaboratory

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

    at 8.54 i noticed code that is never updated later to a better version. Line 27 lets the player take a horizontal step and then follows a check on the keys pressed. This should be done in reverse order. First set the new speed then take a step with the new speed.

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

    Thank you!!! This pPlaylist is amazing

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

    These videos are Awesome!!!

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

    Did you have one video on manager sates save/export managing data?
    Example for JRPG, where it can become really deep and complexe.

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

    Is there final source code/repo available in which I can compare my code from the series against to resolve some state bugs I am running into?

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

    Hey, I’ve redone all of the code a lot of times and I’m still getting the same problem where after I add in the plant enemy my game only runs a few seconds and then the sprites stop moving. It works just fine with just the bug but I was wondering if you could help because I’ve tried everything from deleting everything and starting over to moving the FPS down and all of that.

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

      What is the console error you get. That should tell you what's wrong

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

      @@Frankslaboratory Uncaught TypeError: Failed to execute ‘drawImage’ on ‘CanvasRenderingContext2d’: the provided value is not of type
      (The error code is long)

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

      @@anaccount687 you need to link your image correctly. Make sure you are using the right ID and passing the right arguments to drawImage

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

      @@Frankslaboratory that worked thank you but I still can’t see them showing up on the screen, (no errors though) do you have any other ideas? Thank you so much for all of your help.

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

      @@anaccount687 probably still passing wrong arguments to draw image method so it's not cropping out the right area. Alternatively Che the class. If its enemies you have problems drawing console log enemies array and check if theirs properties like x y width and height have values and are not undefined

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

    My Win and Lose conditions sometimes don't show up but then again sometimes it does. What could be causing this issue?

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

      Hi, could be literally 100 reasons, put some console logs in there and check when they run and when they don't. Check console for errors. Eliminate potential causes one by one until you find the right one. Hard to tell without seeing your code. If your code is exactly as mine it will work.

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

    Is something wrong with bevouliin? I can't open their site today at all.

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

    The fourth to comment 😁. So happy that I can now practice with you 🥰.

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

      Hi Ekomabasi, nice to meet you, glad you found some value :)

  • @Lucid-xg6ur
    @Lucid-xg6ur 2 роки тому

    thank you!

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

    Is it possible you can code an npc that follows you around like a partner? If so, how can that be done?

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

      Yes, it could be animated in the same sprite sheet if its just a small droid or floating eye following the main character. If the npc has more complex behaviour it can be a special Companion class with special methods to follow player, shoot enemies etc

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

    Hey Frank, I have a question, do you see a blinking for the player character after a collision is detected that sets the player to state Hit? I feel like the maxFrame from Hit is being carried into the new Running State. I don't see the animation blink for any other states after a collision. Could this be tied to setState function?
    EDIT: I figured it out, on the Running state I did not update the line of code that sets the maxFrame. My enter() method was updating the property on the State object instead of the player object. After updating this.maxFrame = 8 to this.game.player.maxFrame = 8, I no longer saw any blinking. That was bothering me for a while, hope this helps someone out :)

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

    Hey Frank, I wanted to watch your last tutorial about bonus features and when I tried to move left with LeftArrow I moved right... so I cant move to the left anymore. I don't get any errors in my console. Have you got any idea what the problem could be?

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

      Show me the code that runs when you press left arrow. Are you subtracting or adding

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

      @@Frankslaboratory can you help me out a little, in which file do I have to look? They are all named the same as yours

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

      @@Frankslaboratory is it in player.js and then in the update(input, deltaTime) and then the this.x += this.speed?

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

      @@Frankslaboratory Do you possibly know what could be the case?

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

      Show me the code that runs when left arrow key is pressed and show me the constructoe where your speed value is defined

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

    Sir please make a similar game like ninja arashi using JavaScript and thank you for this course

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

      Hi, yea Ninja Arashi would be possible to do in JavaScript, it's very similar to techniques I use here plus it has platforming

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

      This course is really helping me to learn JavaScript sir, Iam not even motivated at first because of other boring projects

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

    Hi, thanks for your vidéos. Can you make a videos on boss level and level please ?

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

      Hi, yes I will do boss battles and multiple levels, probably as a part of a different project

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

      @@Frankslaboratory oh !! I am waiting impatiently

  • @LupoArticoblu
    @LupoArticoblu 3 місяці тому

    i have a tricky issues with (!game.gameOver)requestAnimationFrame; when game over is true the condition in UI.draw doesn't return the game over text. idky but my code is the same than your

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

    this.typos = 1;