Code Pacman in Java

  Рет қаралды 30,937

Kenny Yip Coding

Kenny Yip Coding

Күн бұрын

Пікірлер: 47
@KennyYipCoding
@KennyYipCoding 3 ай бұрын
//X = wall, O = skip, P = pac man, ' ' = food //Ghosts: b = blue, o = orange, p = pink, r = red private String[] tileMap = { "XXXXXXXXXXXXXXXXXXX", "X X X", "X XX XXX X XXX XX X", "X X", "X XX X XXXXX X XX X", "X X X X", "XXXX XXXX XXXX XXXX", "OOOX X X XOOO", "XXXX X XXrXX X XXXX", "O bpo O", "XXXX X XXXXX X XXXX", "OOOX X X XOOO", "XXXX X XXXXX X XXXX", "X X X", "X XX XXX X XXX XX X", "X X P X X", "XX X X XXXXX X X XX", "X X X X X", "X XXXXXX X XXXXXX X", "X X", "XXXXXXXXXXXXXXXXXXX" }; Completed code with sprites: github.com/ImKennyYip/pacman-java
@musicplaylist6909
@musicplaylist6909 Ай бұрын
Hi, just a self taught developer leaving time stamps while learning using this video. Thanks Kenny, these tutorials are really well made and extremely coherent. I hope your channel grows exponentiallY!!!!!!!!!!!!!!!!!!!!! 5:11 Creating game window 10:32 Loading images 14:11 intuition behind mapping 18:59 creating objects to be displayed on map 21:11 drawing the actual map 31:50 explaining the game loop and implementing it 34:03 implementing key listeners for pacman movement 43:34 implementing collision detection 48:43 implementing sprite direction changes for pacman 50:16 implementing ghost movements 56:15 final touches: score, lives, pacman-ghost collision, game-over
@neverexperience
@neverexperience 3 ай бұрын
Fantastic video man, just coded along with the video. The walkthrough was very smooth and great explanation. Loved it I'm thinking to add an 8 bit audio, powerups etc, it was real fun
@LBCreateSpace
@LBCreateSpace 3 сағат бұрын
22:20 there is a lil c++ in your Java sir! xD But seriously, ty for making this tutorial
@shadyyam2488
@shadyyam2488 Ай бұрын
love watching your java tutorials. gives me so much more motivation to explore the language and have fun with It. pls make more of these with java
@CaioSantos_p15
@CaioSantos_p15 3 ай бұрын
You're the goat man! I love all your videos!
@MarkE-mp9li
@MarkE-mp9li 2 ай бұрын
This channel is amazing! I've just started learning Java and your channel has been really helpful
@snushee
@snushee Ай бұрын
Can you please tell me the first steps you've done to learn Java? Do you recommend starting with this video a a begin to learn Java?
@gungorberkayakkan9804
@gungorberkayakkan9804 12 күн бұрын
@@snushee if you are still interested after 4 weeks i think that you should not start with java but learn basic and advanced algorithims as they are basically the code and the words that we use to represent those algoritithims are just syntax and they are easy to learn as a 15 year old self learnt coder that have been coding for 5 years now this is the easiest way hope that you are still interested(sorry for misspeling english is my second language)
@gungorberkayakkan9804
@gungorberkayakkan9804 12 күн бұрын
@@snushee Have fun on your journey hopefully not full of bug and syntax error at line 27's :D
@lokaam3092
@lokaam3092 3 ай бұрын
hi! great tutorial that was very efficient thank you so much! ps: at 20:45 you said you would put the map code in the video description and i think you forgot ;)
@KennyYipCoding
@KennyYipCoding 3 ай бұрын
ahh yes I did forget!, Added the map code in pin comment
@givoxx4970
@givoxx4970 Ай бұрын
Nice video, i wrote this code with you, everything worked and i learned a lot 5!
@yuppolo
@yuppolo 10 күн бұрын
Thank you so much, this just motivated me to learn more about java
@laylaarshedmim5503
@laylaarshedmim5503 Ай бұрын
Very good and clear explanations. Thank you so much for your efforts. Keep up the good works. Love and Respect.
@n4nalife
@n4nalife 3 ай бұрын
Thanks for your videos! They are amazing :)
@koketsobakwenamathole7773
@koketsobakwenamathole7773 Ай бұрын
I had to subscribe because this is amazing. I will attempt a clone as well.
@x-elo
@x-elo 12 күн бұрын
1:05:10 made me laugh so much, i wasn't expecting it at all
@chiuvinson5035
@chiuvinson5035 13 күн бұрын
Great stuff! It's a bit hard to move around, it seems like it's not picking up my inputs until I spam the direction key. is this the fault of my laptop maybe? I dont know how you could make it smoother
@HarisKhan-i7b8s
@HarisKhan-i7b8s 2 ай бұрын
kenny, is any datastructure used in that project???
@SHEMZILLER
@SHEMZILLER Ай бұрын
hi i have been following you series how to add audio?
@lila7410
@lila7410 2 ай бұрын
9:00 Why did u add private to all of them?
@ugniusmamaniskis502
@ugniusmamaniskis502 2 ай бұрын
thats so noone could cahnge the values
@stefangrigore8878
@stefangrigore8878 3 ай бұрын
bro, your work is amazing, but can you please help me with something? everytime i save my project some lines in the code gets deleted and i dont know why. Ill apreciate it if you can help me
@KennyYipCoding
@KennyYipCoding 3 ай бұрын
That doesn’t happen to be so I have no idea why that is the case either, are you using vscode with Java? What lines are being deleted? Empty white space lines?
@stefangrigore8878
@stefangrigore8878 3 ай бұрын
@@KennyYipCoding yes, i am using vscode with java. im a begginer and im trying to learn. These 3 import java.awt.event.*; import java.util.HashSet; import java.util.Random; No matter what i do they always get deleted
@KennyYipCoding
@KennyYipCoding 3 ай бұрын
There’s probably some extension installed or built in setting that gets rid of unused imports. If you add import statements and save, technically you still haven’t used the imports so the code automatically gets deleted. Should be an easy fix if you google/stack overflow “vscode unused imports being deleted”
@stefangrigore8878
@stefangrigore8878 3 ай бұрын
@@KennyYipCoding thanks for the help i managed to fix it
@robtai6225
@robtai6225 3 ай бұрын
awesome thank you so much!!!
@johnmichaelocado5261
@johnmichaelocado5261 2 ай бұрын
Can i ask what are the sizes of the pictures that you used on this game?
@byool8721
@byool8721 Ай бұрын
am i able to recreate this with apache netbeans?
@excujeeme997
@excujeeme997 3 ай бұрын
Hey can you tell me which platform you are using for coding?
@KennyYipCoding
@KennyYipCoding 3 ай бұрын
Vscode, there is a video link guide in my video description explaining how to setup Java with vscode
@SajithaUdesh
@SajithaUdesh 2 ай бұрын
Can you tell me the name of the app you used here?
@KennyYipCoding
@KennyYipCoding 2 ай бұрын
You mean the code editor? It’s called vscode, as mentioned in the video.
@ihavefriends420
@ihavefriends420 Ай бұрын
1:00 give us a flashbang warning please
@KennyYipCoding
@KennyYipCoding Ай бұрын
you'll surive!
@UpskillingAcademy
@UpskillingAcademy Ай бұрын
Hello, My name is Eka from Upskiling. I'm really interested in the content you create, and I would like to ask for your permission to use the link to your KZbin video as a resource on the Upskiling website. Please note that Upskiling will not repost or re-upload the video from your KZbin channel; we will only be sharing the link to the video. I hope to hear from you soon. Thank you! 🙏
@KennyYipCoding
@KennyYipCoding Ай бұрын
@@UpskillingAcademy Hi, it is okay to link my KZbin channel videos as long as the videos and source code are not reposted or re uploaded on your website AND you are not charging anyone for access to my free content AND nobody is impersonating or pretending to be me on your platform. If that is the case, feel free to share the link to my video ! 🙂
@odtu4948
@odtu4948 Ай бұрын
guys do you have full code of this with homework done ?
@gilmar6577
@gilmar6577 15 күн бұрын
Here is the code to teleport through the gap in the walls. Put this code on move function. if (pacman.y == tileSize * 9 && pacman.x == 0){ pacman.x = tileSize * columnCount; }else if (pacman.y == tileSize * 9 && pacman.x == tileSize * columnCount){ pacman.x = 0; }
@adityamukherjee2207
@adityamukherjee2207 3 ай бұрын
bro while trying to run the code after 27:40 , the following error is showing : exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null at java.desktop/javax.swing.ImageIcon.(ImageIcon.java:232) at Pacman/pacman.Pacman.(Pacman.java:88) at Pacman/pacman.App.main(App.java:22) i have tried changing the path if the images , but still not working . i am using eclipse ide. can u help me further in this plz ....
@ugniusmamaniskis502
@ugniusmamaniskis502 2 ай бұрын
ask chatGPT
@167-naureen3
@167-naureen3 2 ай бұрын
Same error is showing on my code too if you have found how to solve that plz tell me🥲
@giorgiarevadze2162
@giorgiarevadze2162 Ай бұрын
images need to be in src/main/resources for me it was the issue, hope it helps
@dexter7023
@dexter7023 19 күн бұрын
Also having the same issue, if you managed to solve it, please let me know how.
Code Black Jack in Java
58:39
Kenny Yip Coding
Рет қаралды 46 М.
I am not sorry for switching to C
11:34
Sheafification of G
Рет қаралды 215 М.
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
Why is every React site so slow?
13:52
Theo - t3․gg
Рет қаралды 153 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1,1 МЛН
I coded one project EVERY WEEK for a YEAR
13:13
Carter Semrad
Рет қаралды 810 М.
Pac-Man Ghost AI Explained
19:34
Retro Game Mechanics Explained
Рет қаралды 1,4 МЛН
Как наука победила религию
17:02
A Deep Dive into JVM Start-Up
22:03
Java
Рет қаралды 31 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 855 М.
7 Design Patterns EVERY Developer Should Know
23:09
ForrestKnight
Рет қаралды 293 М.
Code Flappy Bird in Java
54:02
Kenny Yip Coding
Рет қаралды 193 М.