Coding Pac-Man in JavaScript Complete Tutorial Every Step Explained

Coding Pac-Man in JavaScript Complete Tutorial Every Step Explained

Coding With Adam

2 года назад

41,111 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Андрей Ильин
Андрей Ильин - 15.09.2023 17:33

отличное объяснение

Ответить
michael_hackson
michael_hackson - 14.09.2023 22:18

Thanks! Super tutorial!

Ответить
flebedev99
flebedev99 - 21.07.2023 04:33

I have noticed that the ghosts mostly travel on the outside of the level and they barely reach the center.

Ответить
Scott Atkinson
Scott Atkinson - 01.07.2023 17:45

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

Ответить
KYBER TV
KYBER TV - 12.06.2023 16:11

Bro, this code not works on my computer. I have only background. I use new version of Linux. Where is the problem?

Ответить
JURASSIC WORLD
JURASSIC WORLD - 08.06.2023 08:28

Hello, I downloaded the code but it doesn't show me the game
help me please

Ответить
Scott Atkinson
Scott Atkinson - 26.05.2023 20:21

Please help with the win function to handle more than 1 dot type

Ответить
Scott Atkinson
Scott Atkinson - 17.05.2023 13:56

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.

Ответить
Scott Atkinson
Scott Atkinson - 14.05.2023 22:07

Im struggling to make the win function as I have a couple of different types of dots

Ответить
Scott Atkinson
Scott Atkinson - 14.05.2023 10:09

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.

Ответить
Scott Atkinson
Scott Atkinson - 13.05.2023 17:26

Ok so I changed the const name to turn but now when he goes along the bottom hes upsidedown lol

Ответить
Scott Atkinson
Scott Atkinson - 13.05.2023 14:51

Hi Adam I'm getting an error saying size is already defined so I'm having didfficulty rotating please help

Ответить
Scott Atkinson
Scott Atkinson - 02.05.2023 19:26

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

Ответить
adheeb
adheeb - 27.04.2023 06:48

I keep getting an error in Game.js for const ctx and const canvas. it says cannot redeclare block-scoped variable 'canvas'

Ответить
Tozagul Tojiboyeva
Tozagul Tojiboyeva - 29.03.2023 15:33

Thanks for the easy following tutorial.
But I cant move pacman ,it is bug free.I don't have a clue

Ответить
Legendary Fish
Legendary Fish - 29.03.2023 02:38

im only 2 minutes in and i can tell this will be another great tutorial so keep it up!

Ответить
anony mous
anony mous - 26.03.2023 07:22

Thanks for the easy to understand tutorial.
I'd love to see a simple multiplayer RPG game next!

Ответить
hao wangg
hao wangg - 17.03.2023 19:32

thank you!

Ответить
Bartnick81
Bartnick81 - 12.03.2023 21:16

Dziękujemy.

Ответить
Wampire Beatbox
Wampire Beatbox - 20.02.2023 00:58

Thank you so much! Great stuff!

Ответить
aWicca
aWicca - 26.01.2023 22:37

Great stuff!
I liked the pace, the explanations were on point, finished the tutorial with 0 confusion.
Definitely following for more!

Ответить
johnnie gilkerson
johnnie gilkerson - 31.10.2022 19:22

Works good, How about a score?

Ответить
Andrea Zwingler
Andrea Zwingler - 06.10.2022 17:20

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

Ответить
Mahmud Kaşgari
Mahmud Kaşgari - 03.10.2022 17:46

Very professional coding and teaching. thank you very much!

Ответить
Gaurav Tiwari
Gaurav Tiwari - 21.09.2022 07:40

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?

Ответить
Ashwin S. Kumar
Ashwin S. Kumar - 24.07.2022 03:14

There is no scoring and will this work on mobile?

Ответить
skenox
skenox - 17.07.2022 22:44

wooooah this is insane, greatly appreciate your tutorials :)

Ответить
Vladimir Filipov
Vladimir Filipov - 08.07.2022 16:06

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!

Ответить
ORi Winboim
ORi Winboim - 19.04.2022 21:55

thank you! this is great

Ответить
Kalahari
Kalahari - 18.04.2022 06:02

The use of Game dev terms and concepts is appreciated. Thank you ❤️🔥

Ответить
Tczewianka19
Tczewianka19 - 10.03.2022 12:20

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?

Ответить
BlackFire
BlackFire - 08.03.2022 19:44

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

Ответить
C Rutherford
C Rutherford - 27.02.2022 05:50

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.

Ответить
José Aparecido
José Aparecido - 18.02.2022 13:18

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?

Ответить
john html
john html - 30.12.2021 12:46

thank you so much so
smooth

Ответить
Madi Vallarino
Madi Vallarino - 14.12.2021 01:37

Great walkthrough and I'm very excited to continue to grow this project. Thanks for all your work!

Ответить
Maniixer
Maniixer - 12.11.2021 20:52

your video's are amazing! thank you for teaching us ^^

Ответить
Modpod
Modpod - 11.11.2021 06:25

This is excellent! Your voice is clear and you explained your thinking! You are extremely underrated my man :)

Ответить
James Cao
James Cao - 30.10.2021 00:19

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.

Ответить
James Cao
James Cao - 25.10.2021 03:39

In lines 9 to 13, the statement listed as pacman = tileMap.getPacman(velocity), is pacman.draw(ctx) defined? Thanks for your response in advance.

Ответить
Hisoka Morow
Hisoka Morow - 21.10.2021 13:38

OMG I'm the 999 subscriber

Ответить
Sergio Tortosa
Sergio Tortosa - 07.10.2021 10:01

Awesome!!! Thanks for all tutorial👍🏻

Ответить
Gencode Thailand
Gencode Thailand - 30.09.2021 20:26

Thank you. Can you make a pong game, or memory card game, or dinosaur jumping game tutorials? Thank you.

Ответить
Forrest Goryl
Forrest Goryl - 27.09.2021 11:00

This is such a great walkthrough, I highly recommend it!! I've even told my non-programmer friends about it

Ответить
Luu Duong
Luu Duong - 07.09.2021 03:44

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!

Ответить