Hello my dear coders,
Coding pacman was difficult than I thought. I’ve used Dijkstra algorithm for the ghosts. I am open to any ideas to develop the game. You can fork and develop the game as you wish. We need to work on ghosts more. Because they sometimes go to a corner and wait there. Maybe we could decrease the interval time of changing random targets for the ghosts.
I will be waiting for your pull requests on Github.
Hope you like it!
Twitter:
👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻
Source code:
Live a star on github, if you enjoy!
👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻👨💻
📦📦📦📦📦📦📦📦📦📦📦📦📦📦📦
⌨️ Keyboard: YUNZII KEYNOVO IF98 Gateron Red Switches
📦📦📦📦📦📦📦📦📦📦📦📦📦📦📦
00:00 Keyboard Check
00:18 Creating files
00:35 Preparing and introducing assets
02:12 Running HTML file
02:43 Coding
04:16 Creating map[]
13:20 drawWalls()
19:14 drawWalls() is done
19:52 Coding
21:24 ()
22:03 directions constants
22:45 ()
23:40 ()
25:25 ()
27:25 ()
27:59 createNewPacman()
29:08 ()
32:00 Solving animation bug
32:23 Creating event listener for keyboard
33:00 Getting keyCodes of wasd and arrow keys
35:33 ()
36:42 Pacman can move now
37:53 drawFoods()
39:38 ()
41:15 Pacman can eat now
42:15 Fix on map
42:55 drawScore()
44:50 Coding
46:36 createGhosts()
50:16 drawGhosts()
51:48 ()
52:33 ()
56:36 ()
57:05 ()
59:05 () - Helper function for Dijkstra path finder algorithm
01:04:39 Solving a bug on path finder function
01:05:38 ()
01:07:32 restartGame()
01:08:06 gameOver()
01:08:27 drawLives()
01:11:00 drawGameOver()
01:14:03 drawWin()
01:15:55 Completed
01:16:49 Drawing range of ghosts
01:19:25 Incredible fail :(
01:21:13 Winner winner, chichken dinner
1 view
306
72
1 month ago 00:00:29 1
Organização De Um Computador - Parte 5 - ASMR - Sussurros - ASMR Programmer
2 months ago 00:36:08 2
Solo HONDA NSX camping in beautiful mountain japan. Nature ASMR. Relaxing healing cosy tent and tarp
2 months ago 00:01:41 1
Basic - ASMR - Sussurros
2 months ago 00:47:19 1
Experience the Magic of the COTSWOLDS: Wyck Rissington, ENGLAND
2 months ago 00:20:17 1
ASMR Role Play for ANXIETY & DEPRESSION Relief
2 months ago 00:03:53 1
Love Me Like You Do - Tony x Peter
2 months ago 00:20:45 1
ASMR Programming - Spinning Cube - No Talking
2 months ago 00:08:52 1
RUST - ЭЛИТНЫЕ МАКРОСЫ
2 months ago 00:00:35 1
Organização De Um Computador - Parte 4 - ASMR - Sussurros - ASMR Programmer
3 months ago 00:03:09 1
Java - ASMR - Susurros - ASMR Programmer
3 months ago 02:22:22 1
🚿 Cleansing Away + ✂️ Removing Ur Stress 🤤 | ✨ Energy Healing Session ✨
3 months ago 00:05:40 9
Breast Examination - OSCE Guide | UKMLA | CPSA
3 months ago 00:43:02 1
Early Morning COTSWOLDS Walk: Discovering a Hidden Gem in ENGLAND’S Countryside
3 months ago 00:00:41 1
Organização De Um Computador - Parte 3 - ASMR - Sussurros - ASMR Programmer
3 months ago 00:19:21 1
💎SPECIAL: Ripple / XRP Connected to IQD, VND and ALL CURRENCIES So We Can Exchange + FARMERS Get $$
3 months ago 00:53:10 1
COTSWOLDS, ENGLAND: Early Morning WALK Through a Thatched Village