HELP WITH JAVA PLEASEEEEE!! #124717
Replies: 1 comment
-
To help you fix the issue where the "Game Over" screen does not appear, let's follow these steps to debug and correct your code. I'll make sure to add comments and explain each part of the process. Analysis and Debugging
Modifications and FixesI'll highlight any necessary changes and ensure the game displays the "Game Over" screen correctly. Updated
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Body
First of all, english isn't my first language.
Second, i don't know anything about java, but i'm trying to do a snake game (and if it works, it's gonna be a gift for boyfriend, who studies programming, anyway!), i did a lot of stuff on my code, and it was everything great, until a import some differents fonts, i got to import those text fonts for my code, but then, the "Game Over" screen didn't appear anymore, and i don't know what to do anymore!!!! Please, can someone help me??? I'm totally desperate, I've tried everything, I've researched, but I think the error is very specific!! And I have no one to ask
I don't think that the problem was the new text fonts, but something is happening to the game over screen... it was working before....
PS.: since i dont know ANYTHING about JAVA (this "beautiful" language), i did my code based on videos on youtube that i watched to learn at least the basic (spoiler: i couldnt learn, it doesnt matter how I tried), and the base of the game i got here on github, that i found from a youtube video (i tried to send the creator a message, but no answers) but it was the basic of the basic, I put a lot of things, so it must have a lot of "wrong things". ( i got a lot of help from ChatGPT -- what a shame)
But that is it! I'm having a problem with the Game Over screen that doesnt appears anymore when I lose the game...
Here is my complete code (it will have a lot of things in Portugues-BR, but it's nothing important, just notes that i took thorught of the code):
package GameFrame;
import java.io.File;
import java.io.IOException;
What appears to me, when I lose in the game, is this message: "at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)" (what is this?????????)
The game stops, i can click the button to restart and i restart the game, but, the only thing wrong is the game over screen that doesn't appear!!!!!!!!
The code has another two public classes:
package GameFrame;
import javax.swing.JFrame;
public class GameFrame extends JFrame{
}
And
package GameFrame;
public class SnakeGame {
HELP ME PLEASE
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions