//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
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
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 ;)
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
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?
@@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
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”
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 ....
//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
This channel is amazing! I've just started learning Java and your channel has been really helpful
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
kenny, is any datastructure used in that project???
You're the goat man! I love all your videos!
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 ;)
ahh yes I did forget!, Added the map code in pin comment
Can i ask what are the sizes of the pictures that you used on this game?
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
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?
@@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
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”
@@KennyYipCoding thanks for the help i managed to fix it
Hey can you tell me which platform you are using for coding?
Vscode, there is a video link guide in my video description explaining how to setup Java with vscode
Can you tell me the name of the app you used here?
You mean the code editor? It’s called vscode, as mentioned in the video.
Thanks for your videos! They are amazing :)
9:00 Why did u add private to all of them?
thats so noone could cahnge the values
awesome thank you so much!!!
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 ....
ask chatGPT
Same error is showing on my code too if you have found how to solve that plz tell me🥲