Here is a link to try the game: codingwith-adam.github.io/pacman/ If you plan to deploy to github pages make sure to update the image and sound urls to strip out the '../' this was an oversight. Link to all the assets is in the description. I hope you enjoy the tutorial.
Thanks Luu! That’s awesome! You’re officially a game developer now. I hope your son enjoyed the game. A Mario bros type game would be fun to make. I plan to do that in the future.
@@CodingWithAdam Nice, he'll have to subscribe to your channel and do it himself! Nothing better than the reward of playing a game that you built yourself... with your help of course!
That’s so true. Look forward to his subscribe and making the game. I suggest trying the intro to game development tutorial on my channel. If successful he should give the snake tutorial a try as they increase in difficulty.
Awesome! Thank you for the great feedback. Really glad you enjoyed the tutorial. I really enjoy making the game dev tutorials more to come in the future!
A well-documented tutorial, but attempted to use this as a template to expand in a different direction artistically and ran into some difficulties, particularly with the enemy A.I. and loading the sound effects. Unsure if that's an issue with the assets I was aiming to implement or if there's something I was missing? Either way, very well explained and easy to follow when the code wasn't fighting with me. :) Good video!
Thank you! I really appreciate the feedback. I’m really glad you enjoyed the video and were able to take the project in another direction. Sometimes running into issues is just the coding process 😁
Thanks for your making a very good game in JavaScript. That I follow your instructions to get pressed an arrow key code failed instead it can be used to return a string such as "ArrowUp" from the event.key.
@@CodingWithAdam To replace the code which does not return a number for an arrow key pressed , I have tried the code as following: document.addEventListener("keydown", this.#keydown); #keydown = (event) => { if (event.key === "ArrowUp") { // this is one of four strings if (this.currentMovingDirection === MovingDirection.down) this.currentMovingDirection = MovingDirection.up; this.requestedMovingDirection = MovingDirection.up; this.madeFirstMove = true; } //..continue the code for the rest of three cases. } The code on my side is working. I don't know why this would happen.
I loved this tutorial. Your a great teacher and so clear and easy to follow. Pleeeease can you add mobile functionality as i like playing on my phone at work and showing my friends
Thank you for the amazing feedback. I’m really glad that you enjoyed the tutorial. I’ll see if I can do this in the future. In the mean time I did add mobile in my latest game dev tutorial on the chrome Dino game. Although the mobile controls are simple since all you do is tap the screen.
You’re welcome! I’m really glad that you enjoyed the tutorial and that it was easy to follow. Thank you for the awesome feedback I really appreciate it! 😀
This tutorial was awesome! Helped a lot to understand JavaScript. But a I have a question… how can i put more levels to when all dots were gone he switch the map for the next level?
Thank you! Congratulations for completing the tutorial! Really great question. I have not done this yet but I would put the code to change the map in the tileMap class. In the tileMap you could define a list of maps and a property to track the current level the index of the array. When you pass the first level the game.js could tell the tileMap to go to the next level. I hope this tip helps. Perhaps in the future I will make a follow up video. Currently I'm working on other videos one of which is space invaders!
@@CodingWithAdam I will try just like you said! I would love if you can make this video in the future, so excited for it. The space invaders sounds increable to make. Let us know soon as possible. Thanks for all the suport!
I've cracked it. So I made it so all dots turn to cash when eaten then when all cash is eaten u win the game. I've created a new map for level 2 but not sure how switch to that map after first level is complete. Please help
Awesome that’s really great progress congrats 😀 For the map switching I’ll have to look at the code again. If I recall the names of the objects correctly the game file could track which level you are in. That value can be passed into the tile map to select a map. On the the game over win screen you could listen for a space bar or enter press that would switch the level to 2. These are some rough ideas hope they help.
Hi Adam, This is an amazing project, I'm learning so much from your clear teachings. Please please please can You add mobile functionality as a final touch to this project so I can play it on my phone and show friends etc.
Very nice. Do you have a code snippet or advice for placing a bonus fruit in the middle of the screen, or having one enter and march around the board, like in Ms Pacman? I imagine it would be something like adding a 4th ghost in, but with a different sprite and having it always be flagged blue.
Thank you. I have not implemented that yet but your ideas are good. I would suggest implementing the static fruit like the pellets or power pellet. For moving fruit they do seem similar to the ghosts in the blue state. You could try to use inheritance if you are familiar with that to inherit from the ghost or a common base class that the ghost and fruit use. Thank for taking the tutorial!
Sounds like you are near the start of the tutorial. I would start at the beginning. You can also compare against the repository linked in the description.
Hey man! Very great tutorial! Do you have any ideas for implementing a pathfinding algorithm for the Ghosts? I want to make it so that Dijkstra’s algorithm is used with some randomness so the ghosts don’t kill you all the time. Thanks!
You’re welcome! Glad you liked the tutorial. I have not explored using a path finding algorithm yet. I really like the suggestion and might look into it in the future. Excited to hear your findings! 😀
Hi I have just subscribed to this brilliant tutorial. Basically I am sport journalist and I like writing creative sport article, mixing different genders like music, cinema and videogames to sport. So I need to implement PacMan, having a tennis court behind instead of a wall. I followed step by step your tutorial, but I am now blocked because gameloop function is not being called from Browser. There might be some firewall or some checks carried out, as I cannot see the wall being drawn and the function executing within the Chrome Console. The code is equal to your code. Any suggestion is really welcomed. Thanks in advance. Andrea
Thank you for subscribing! That's a really interesting project. I would suggest taking a look at the solution linked in the description. Download the solution and see if you can make it run on your computer. This is a good starting point from here you can try to figure out what code that you might be missing in your solution.
Hi @@CodingWithAdam , thanks for all the support. I would like to ask you a couple of permissions: 1. Permission to mention you in my article. I have added the following words to the text of my article titled "Being Pac-Man Charlie": "It was not easy to conceive such crazy idea and I was undoubtedly helped by Adam, whose tutorial was essential to learn a little bit of logic related to game development. In fact I am honest with myself, when say that all the logic of the videogame, written in JavaScript comes from Adam brilliant tutorial, having done myself only some "cosmetics operations", mainly related to choosing colors, images and fonts. Therefore I also put here the link to Adam youtube channel, in case someone would like to learn how to develop games not only using JavaScript paired with Visual Studio Code, but even more things related." Links are embedded within the words: tutorial and youtube channel. 2 Permission to publish in GitHub my "cosmetic version", in order to allow my subscribers and fans to play the videogame, even if the structure comes from your work. Just let me know what you think. Then, once I will publish my article, I will forward if you wish the link of my piece. Thanks in advance. Andrea
So I've sorted the mobile controls. Yay but still struggling to win game with multiple dot types and sound issues on touch which is weird as user interacted first 🤔. And just 1 more question. Can u respawn ghosts after they are eaten cos if the map is big and you've eaten the ghosts it's too simple.
Awesome you have made some great progress!!! Yes you can respawn please check the comments I provided a code snippet ( I would copy paste it but I’m on my phone). Keep up the great work!!! 😁
I get error "Cannot read properties of undefined (reading 'drawImage')" when i am at 35:10 in the video. Also my wall does not appear... I have tried to verify that there is no typo or anything like that. I have made sure about uppercase and lowercase that everything is correct and i checked that i dont accidentally wrote a comma instead of dot and all this kind of things. It is just not working. I have checked everything....
Hi Skillzor, sorry to hear that. Programming can be frustrating at times :( My best advice is to start from the beginning and as you go make sure to stop and check each part is working. I hope this advice helps :)
@@CodingWithAdam But now i have another problem... I get this error in console "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." The game works perfectly fine but i just have this error. When i read online they say i should add mute like this.wakaSound.muted = true but i tried it and it did not work. The error is still there
when we are inserting pacman image i am unable to do it, i tried to give the address directly to see other issue but still didn't get the result. any idea why?
Awesome glad it worked. Here is a quick way you can get that working by using setTimeOut. In pacman eatGhost method you can add this. setTimeout(() => enemies.push(enemy), 1000 * 5); The ghost will reappear where it died. Here is the full method #eatGhost(enemies) { if (this.powerDotActive) { const collideEnemies = enemies.filter((enemy) => enemy.collideWith(this)); collideEnemies.forEach((enemy) => { enemies.splice(enemies.indexOf(enemy), 1); this.eatGhostSound.play(); //New code here to respawn setTimeout(() => enemies.push(enemy), 1000 * 5); }); } }
For some reson I can't draw walls or yellow dots on canvas. Code looks exactly like yours. There should be no problem with directory to the image. There is no info about mistakes in the console. What could I do wrong? Any ideas?
Try putting a console.log(“here”) message in the game loop and check the console. If it’s there that’s good remove it and go one level deeper. For example put one in the tile map to make sure it’s executing the code. Let me know if that helps
For some reason when I implemented all of the pause methods for Pac-Man and the ghosts I’m not able to move them anymore? Could you help me where I’ve gone wrong
Amazing tutorial! However I have an issue, I followed the tutorial (by tiny detail) just to make sure I haven't messed up a spacing, a bracket, anything that might interfere.. I managed to make the ghosts move once, however even after adding the collision check with the environment, the ghosts continue to move once and then stop forever. I made sure to follow every single step up to this point with no typos, and it just won't work.
I feel stupid, apparently the line "this.directionTimer = this.directionTimerDefault;" was missing after setting up the 10-50 field for the number randomizer (in your video, line number 17), even though it was there previously the other day.. weird, anyway, very cool tutorial, keep it up!
When we first Define that method at around 42 min the draw method for pac man is not yet defined. Some time after that we define the draw method. I hope that answers your question.
Sorry to hear that. If there not any errors in the console log there might be a typo. Try to compare to the complete solution linked in the description
This is an old tutorial but how did you get the ctx to render the images without an onload event listener. I can't seem to figure it out I'm build it from scratch.
Okay guys , got it , there was problem in the formatar , just uninstall all Beautify plugins , and disable format on save and re start vs code , it will work , ( ps later just download prettier or any 1 formater of your choice)
Awesome tutorial I wish I could finish but at 35:09 I got the error: Uncaught TypeError: Cannot read properties of undefined (reading 'drawImage') at TileMap.drawWall (Tilemap.js:39:13) at TileMap.draw (Tilemap.js:31:26) at gameLoop (Game.js:9:13) I checked it many times. Is it somekind of typo or something else?
Thanks! It sounds like your context (ctx) is null. Check that the ctx has a value with console.log(ctx). The value should be passed into the draw method of tile map in the game loop if I recall correctly.
@@CodingWithAdam i made the same game, but i want to export mine and create a playable game link just like how you did, could you teach me how to do that?
Here is a link to try the game: codingwith-adam.github.io/pacman/
If you plan to deploy to github pages make sure to update the image and sound urls to strip out the '../' this was an oversight. Link to all the assets is in the description. I hope you enjoy the tutorial.
Great tutorial Adam! Made the game for my 7 year old kid since he discovered Nintendo Switch this summer and now he wants me to make Mario Bros!
Thanks Luu! That’s awesome! You’re officially a game developer now. I hope your son enjoyed the game. A Mario bros type game would be fun to make. I plan to do that in the future.
@@CodingWithAdam Nice, he'll have to subscribe to your channel and do it himself! Nothing better than the reward of playing a game that you built yourself... with your help of course!
That’s so true. Look forward to his subscribe and making the game. I suggest trying the intro to game development tutorial on my channel. If successful he should give the snake tutorial a try as they increase in difficulty.
@@CodingWithAdam Will do, thanks again!
@luuduong4213 can you share the pacman code?
Great stuff!
I liked the pace, the explanations were on point, finished the tutorial with 0 confusion.
Definitely following for more!
Awesome! Thank you for the great feedback. Really glad you enjoyed the tutorial. I really enjoy making the game dev tutorials more to come in the future!
This is such a great walkthrough, I highly recommend it!! I've even told my non-programmer friends about it
Thank you Forrest! That's awesome, thank you for recommending my video :)
This is excellent! Your voice is clear and you explained your thinking! You are extremely underrated my man :)
Thank you Modpod. I hope the channel continues to grow. Feel free to share my videos with other people and help grow the channel :)
Thanks for the easy to understand tutorial.
I'd love to see a simple multiplayer RPG game next!
You’re welcome! Thank for the suggestion.
im only 2 minutes in and i can tell this will be another great tutorial so keep it up!
Thank you! That’s great to hear. I hope you enjoy the tutorial! 😀
A well-documented tutorial, but attempted to use this as a template to expand in a different direction artistically and ran into some difficulties, particularly with the enemy A.I. and loading the sound effects. Unsure if that's an issue with the assets I was aiming to implement or if there's something I was missing? Either way, very well explained and easy to follow when the code wasn't fighting with me. :) Good video!
Thank you! I really appreciate the feedback. I’m really glad you enjoyed the video and were able to take the project in another direction. Sometimes running into issues is just the coding process 😁
The use of Game dev terms and concepts is appreciated. Thank you ❤️🔥
You’re welcome! 😀
Thanks for your making a very good game in JavaScript. That I follow your instructions to get pressed an arrow key code failed instead it can be used to return a string such as "ArrowUp" from the event.key.
Thanks James. Sorry I don’t understand your question. Could you provide a few more details.
@@CodingWithAdam To replace the code which does not return a number for an arrow key pressed , I have tried the code as following:
document.addEventListener("keydown", this.#keydown);
#keydown = (event) => {
if (event.key === "ArrowUp") { // this is one of four strings
if (this.currentMovingDirection === MovingDirection.down)
this.currentMovingDirection = MovingDirection.up;
this.requestedMovingDirection = MovingDirection.up;
this.madeFirstMove = true;
}
//..continue the code for the rest of three cases.
}
The code on my side is working. I don't know why this would happen.
Great walkthrough and I'm very excited to continue to grow this project. Thanks for all your work!
Thank you! I’m really happy that you enjoyed the tutorial 😁
This tutorial is so detailed and well done! Great job with this one!
Thanks Fion!
Very professional coding and teaching. thank you very much!
You’re welcome! Thank you for the feedback 😁
I loved this tutorial. Your a great teacher and so clear and easy to follow. Pleeeease can you add mobile functionality as i like playing on my phone at work and showing my friends
Thank you for the amazing feedback. I’m really glad that you enjoyed the tutorial. I’ll see if I can do this in the future. In the mean time I did add mobile in my latest game dev tutorial on the chrome Dino game. Although the mobile controls are simple since all you do is tap the screen.
@@CodingWithAdam Hi Adam I'm getting an error saying size is already defined so I'm having didfficulty rotating please help
Thank u very much, while following step by step I understood the material very wee! U r excellent at explaining things ^^
You’re welcome! I’m really glad that you enjoyed the tutorial and that it was easy to follow. Thank you for the awesome feedback I really appreciate it! 😀
Based on it I tryed to code simple roguelike. It`s not polished yet but im glad i understood mechanics and canvas itself better x)@@CodingWithAdam
wooooah this is insane, greatly appreciate your tutorials :)
You’re welcome! Really glad you enjoy the tutorials :)
This tutorial was awesome! Helped a lot to understand JavaScript. But a I have a question… how can i put more levels to when all dots were gone he switch the map for the next level?
Thank you! Congratulations for completing the tutorial! Really great question. I have not done this yet but I would put the code to change the map in the tileMap class. In the tileMap you could define a list of maps and a property to track the current level the index of the array. When you pass the first level the game.js could tell the tileMap to go to the next level. I hope this tip helps. Perhaps in the future I will make a follow up video. Currently I'm working on other videos one of which is space invaders!
@@CodingWithAdam I will try just like you said! I would love if you can make this video in the future, so excited for it. The space invaders sounds increable to make. Let us know soon as possible. Thanks for all the suport!
Awesome! I really like the suggestion and your excitement for it! I’ll let you know as soon as space invaders is released.
Best tutorial I've ever followed ❤
Thank you for the super thanks! I really appreciate the support! 😀
oh snap he back! with a banger!
Thanks Alan!
I've cracked it. So I made it so all dots turn to cash when eaten then when all cash is eaten u win the game. I've created a new map for level 2 but not sure how switch to that map after first level is complete. Please help
Awesome that’s really great progress congrats 😀
For the map switching I’ll have to look at the code again. If I recall the names of the objects correctly the game file could track which level you are in. That value can be passed into the tile map to select a map. On the the game over win screen you could listen for a space bar or enter press that would switch the level to 2. These are some rough ideas hope they help.
Very well done tutorial! I love it!
Thank you Gian!. Glad you enjoy it!
Hi Adam,
This is an amazing project, I'm learning so much from your clear teachings. Please please please can You add mobile functionality as a final touch to this project so I can play it on my phone and show friends etc.
Thank you so much! Great stuff!
You’re welcome! Glad you liked the tutorial!
Very nice. Do you have a code snippet or advice for placing a bonus fruit in the middle of the screen, or having one enter and march around the board, like in Ms Pacman? I imagine it would be something like adding a 4th ghost in, but with a different sprite and having it always be flagged blue.
Thank you. I have not implemented that yet but your ideas are good. I would suggest implementing the static fruit like the pellets or power pellet. For moving fruit they do seem similar to the ghosts in the blue state. You could try to use inheritance if you are familiar with that to inherit from the ghost or a common base class that the ghost and fruit use. Thank for taking the tutorial!
I keep getting an error in Game.js for const ctx and const canvas. it says cannot redeclare block-scoped variable 'canvas'
Sounds like you are near the start of the tutorial. I would start at the beginning. You can also compare against the repository linked in the description.
Awesome!!! Thanks for all tutorial👍🏻
You’re welcome! Glad you enjoyed the tutorial.
Hey man! Very great tutorial! Do you have any ideas for implementing a pathfinding algorithm for the Ghosts? I want to make it so that Dijkstra’s algorithm is used with some randomness so the ghosts don’t kill you all the time. Thanks!
You’re welcome! Glad you liked the tutorial. I have not explored using a path finding algorithm yet. I really like the suggestion and might look into it in the future. Excited to hear your findings! 😀
Hi I have just subscribed to this brilliant tutorial. Basically I am sport journalist and I like writing creative sport article, mixing different genders like music, cinema and videogames to sport. So I need to implement PacMan, having a tennis court behind instead of a wall. I followed step by step your tutorial, but I am now blocked because gameloop function is not being called from Browser. There might be some firewall or some checks carried out, as I cannot see the wall being drawn and the function executing within the Chrome Console. The code is equal to your code. Any suggestion is really welcomed. Thanks in advance. Andrea
Thank you for subscribing! That's a really interesting project. I would suggest taking a look at the solution linked in the description. Download the solution and see if you can make it run on your computer. This is a good starting point from here you can try to figure out what code that you might be missing in your solution.
Hi @@CodingWithAdam , thanks for all the support. I would like to ask you a couple of permissions:
1. Permission to mention you in my article. I have added the following words to the text of my article titled "Being Pac-Man Charlie":
"It was not easy to conceive such crazy idea and I was undoubtedly helped by Adam, whose tutorial was essential to learn a little bit of logic related to game development. In fact I am honest with myself, when say that all the logic of the videogame, written in JavaScript comes from Adam brilliant tutorial, having done myself only some "cosmetics operations", mainly related to choosing colors, images and fonts. Therefore I also put here the link to Adam youtube channel, in case someone would like to learn how to develop games not only using JavaScript paired with Visual Studio Code, but even more things related." Links are embedded within the words: tutorial and youtube channel.
2 Permission to publish in GitHub my "cosmetic version", in order to allow my subscribers and fans to play the videogame, even if the structure comes from your work.
Just let me know what you think. Then, once I will publish my article, I will forward if you wish the link of my piece.
Thanks in advance. Andrea
So I've sorted the mobile controls. Yay but still struggling to win game with multiple dot types and sound issues on touch which is weird as user interacted first 🤔.
And just 1 more question. Can u respawn ghosts after they are eaten cos if the map is big and you've eaten the ghosts it's too simple.
Awesome you have made some great progress!!! Yes you can respawn please check the comments I provided a code snippet ( I would copy paste it but I’m on my phone). Keep up the great work!!! 😁
Can you share the code for the game?
your video's are amazing! thank you for teaching us ^^
Thank You!
@@CodingWithAdam it doesn't even work
i have linux ubuntu, so idk if its because of that.
I get error "Cannot read properties of undefined (reading 'drawImage')" when i am at 35:10 in the video. Also my wall does not appear... I have tried to verify that there is no typo or anything like that. I have made sure about uppercase and lowercase that everything is correct and i checked that i dont accidentally wrote a comma instead of dot and all this kind of things. It is just not working. I have checked everything....
Hi Skillzor, sorry to hear that. Programming can be frustrating at times :( My best advice is to start from the beginning and as you go make sure to stop and check each part is working. I hope this advice helps :)
@@CodingWithAdam Thanks for reply. Eventually i found the problem. i forgot to pass ctx to i think pacman in game.js
@@CodingWithAdam But now i have another problem... I get this error in console "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." The game works perfectly fine but i just have this error. When i read online they say i should add mute like this.wakaSound.muted = true but i tried it and it did not work. The error is still there
U can fix that a quick way by putting a button on screen. In button put play sound and it will work 👍
thank you! this is great
You’re welcome!
Thanks! Super tutorial!
Thank you! You’re welcome!
when we are inserting pacman image i am unable to do it, i tried to give the address directly to see other issue but still didn't get the result. any idea why?
Sounds like you could have a typo. Look carefully at the code on GitHub and compare.
Omg your tutorial worked :) but do you now a way that makes it so when ghost are died for 30seconds or anytime they respawn!
Awesome glad it worked. Here is a quick way you can get that working by using setTimeOut. In pacman eatGhost method you can add this. setTimeout(() => enemies.push(enemy), 1000 * 5);
The ghost will reappear where it died.
Here is the full method
#eatGhost(enemies) {
if (this.powerDotActive) {
const collideEnemies = enemies.filter((enemy) => enemy.collideWith(this));
collideEnemies.forEach((enemy) => {
enemies.splice(enemies.indexOf(enemy), 1);
this.eatGhostSound.play();
//New code here to respawn
setTimeout(() => enemies.push(enemy), 1000 * 5);
});
}
}
Dziękujemy.
Thank you for the Super Thanks. I really appreciate it and I'm happy that you enjoyed the Pac-Man tutorial!
For some reson I can't draw walls or yellow dots on canvas. Code looks exactly like yours. There should be no problem with directory to the image. There is no info about mistakes in the console. What could I do wrong? Any ideas?
Try putting a console.log(“here”) message in the game loop and check the console. If it’s there that’s good remove it and go one level deeper. For example put one in the tile map to make sure it’s executing the code. Let me know if that helps
@@CodingWithAdam It helped. Thanks.
For some reason when I implemented all of the pause methods for Pac-Man and the ghosts I’m not able to move them anymore? Could you help me where I’ve gone wrong
Is there an error message in the developer console. If not I recommend trying it again by removing the pause code
thank you so much so
smooth
You’re welcome!
Amazing tutorial! However I have an issue, I followed the tutorial (by tiny detail) just to make sure I haven't messed up a spacing, a bracket, anything that might interfere.. I managed to make the ghosts move once, however even after adding the collision check with the environment, the ghosts continue to move once and then stop forever.
I made sure to follow every single step up to this point with no typos, and it just won't work.
I feel stupid, apparently the line "this.directionTimer = this.directionTimerDefault;" was missing after setting up the 10-50 field for the number randomizer (in your video, line number 17), even though it was there previously the other day.. weird, anyway, very cool tutorial, keep it up!
Awesome I’m so happy that you were able to solve the issue. Thank you for taking the tutorial and I’m glad that you are enjoying it.
Please help with the win function to handle more than 1 dot type
Great tutorial!
Thanks!
In lines 9 to 13, the statement listed as pacman = tileMap.getPacman(velocity), is pacman.draw(ctx) defined? Thanks for your response in advance.
When we first Define that method at around 42 min the draw method for pac man is not yet defined. Some time after that we define the draw method. I hope that answers your question.
Thanks for the easy following tutorial.
But I cant move pacman ,it is bug free.I don't have a clue
Sorry to hear that. If there not any errors in the console log there might be a typo. Try to compare to the complete solution linked in the description
How we can add playing button for mobiles like 4 arrows functionalities please tell someone with code or do fork so that we can play on mobile also
This is an old tutorial but how did you get the ctx to render the images without an onload event listener. I can't seem to figure it out I'm build it from scratch.
Figured it out seconds after I typed this. It's the setInterval() and I've been thinking about it for days nw. Haha 😂
thank you!
You’re welcome!!!
OMG I'm the 999 subscriber
That's Awesome Hisoka! Thank you for Subscribing and being the 999th Subscriber!
this.#draw is not woring for me
Okay guys , got it , there was problem in the formatar , just uninstall all Beautify plugins , and disable format on save and re start vs code , it will work , ( ps later just download prettier or any 1 formater of your choice)
Awesome glad you got it working!!!! 🎉
Im struggling to make the win function as I have a couple of different types of dots
Hi Adam I'm getting an error saying size is already defined so I'm having didfficulty rotating please help
There is no scoring and will this work on mobile?
Sounds like a good suggestion for the future thanks.
@@CodingWithAdam No problem!
Hello, I downloaded the code but it doesn't show me the game
help me please
отличное объяснение
Thank you! 😁
Thank you. Can you make a pong game, or memory card game, or dinosaur jumping game tutorials? Thank you.
Thanks for the suggestions Gencode
Works good, How about a score?
Great suggestion it would be easy to added
Awesome tutorial I wish I could finish but at 35:09 I got the error:
Uncaught TypeError: Cannot read properties of undefined (reading 'drawImage')
at TileMap.drawWall (Tilemap.js:39:13)
at TileMap.draw (Tilemap.js:31:26)
at gameLoop (Game.js:9:13)
I checked it many times. Is it somekind of typo or something else?
Thanks! It sounds like your context (ctx) is null. Check that the ctx has a value with console.log(ctx). The value should be passed into the draw method of tile map in the game loop if I recall correctly.
I have noticed that the ghosts mostly travel on the outside of the level and they barely reach the center.
That’s right the enemy Ai is very weak it switches direction based on a random number feel free to try and make it better 😁
is there a code for this that I can look at
The code is linked in the description
@@CodingWithAdam i made the same game, but i want to export mine and create a playable game link just like how you did, could you teach me how to do that?
Ok so I changed the const name to turn but now when he goes along the bottom hes upsidedown lol