Pregunta

I have developed a snake game in Java. The problem is that I see a flicker while the game is running. Can anyone please inform me why this is happening and direct me to a possible solution?

The code for the game can be found here.

¿Fue útil?

Solución

Have you considered double buffering?

Looking at your code, what about the following being a potential cause

Thread.sleep(1000)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top