JavaScript Game Tutorial - Final Polish

  Рет қаралды 9,933

Franks laboratory

Franks laboratory

Күн бұрын

Пікірлер: 51
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
Part 1: kzbin.info/www/bejne/mV6UlXWaZsR6bqM
@John-mv6gs
@John-mv6gs Жыл бұрын
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
@lorenzocarelli1455
@lorenzocarelli1455 12 сағат бұрын
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
@gardenkittens
@gardenkittens Жыл бұрын
Is something wrong with bevouliin? I can't open their site today at all.
@Frankslaboratory
@Frankslaboratory Жыл бұрын
Yes his site is down. Hopefully will get fixed soon
@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 :)
@rupturedrhombus2836
@rupturedrhombus2836 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
@ZachDeLand
@ZachDeLand 2 жыл бұрын
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 жыл бұрын
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 жыл бұрын
What is the console error you get. That should tell you what's wrong
@anaccount687
@anaccount687 2 жыл бұрын
@@Frankslaboratory Uncaught TypeError: Failed to execute ‘drawImage’ on ‘CanvasRenderingContext2d’: the provided value is not of type (The error code is long)
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
@@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 жыл бұрын
@@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 жыл бұрын
@@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
@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.
@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.
@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 4 ай бұрын
Hello sir !!!! I m a big fan of your videos !!!!!
@-flashsnipes
@-flashsnipes 2 жыл бұрын
Sir please make a similar game like ninja arashi using JavaScript and thank you for this course
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
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 жыл бұрын
This course is really helping me to learn JavaScript sir, Iam not even motivated at first because of other boring projects
@ZXCk5kovo
@ZXCk5kovo 11 ай бұрын
Thank you!!! This pPlaylist is amazing
@Frankslaboratory
@Frankslaboratory 11 ай бұрын
Glad you are having fun
@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.
@rosieare4507
@rosieare4507 2 жыл бұрын
I really love your content.. keep going man!
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
Thanks Rosie :D
@melofox._
@melofox._ 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
@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 :)
@Klilkaiser
@Klilkaiser 2 жыл бұрын
Hi, thanks for your vidéos. Can you make a videos on boss level and level please ?
@Frankslaboratory
@Frankslaboratory 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
@jackboone964
@jackboone964 Жыл бұрын
These videos are Awesome!!!
@Frankslaboratory
@Frankslaboratory Жыл бұрын
Glad you found some value Jack
@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 жыл бұрын
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
@Lucid-xg6ur
@Lucid-xg6ur 2 жыл бұрын
thank you!
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
Happy to help
@mikeyonthedrums
@mikeyonthedrums 2 жыл бұрын
this.typos = 1;
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
Probably I made more than 1
JavaScript Game Tutorial - Bonus Features
12:28
Franks laboratory
Рет қаралды 13 М.
JavaScript Game Tutorial - Many Different Enemies
24:37
Franks laboratory
Рет қаралды 15 М.
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 47 МЛН
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 37 МЛН
JavaScript Game Tutorial - Particles & Interactions
31:10
Franks laboratory
Рет қаралды 12 М.
Modern Terminal Showdown: KiTTY vs Wezterm | STLLUG 2024-09-19
2:19:37
Stl Linux Unix Users Group
Рет қаралды 1,9 М.
State Management in Games
1:09:09
Franks laboratory
Рет қаралды 55 М.
JavaScript Game Tutorial - Advanced Techniques
36:48
Franks laboratory
Рет қаралды 26 М.
How To Code Flying Creatures with JavaScript
49:34
Franks laboratory
Рет қаралды 34 М.
Pixel Art Game Development: 2D Camera
46:50
Franks laboratory
Рет қаралды 18 М.
Space Invaders Game Tutorial with JavaScript and HTML Canvas
2:06:39
Chris Courses
Рет қаралды 140 М.
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 47 МЛН