I have a game using the LWJGL and Slick2D made in Java. I recently added this code to get if a pixel is empty:
for (Entity e : onscreenents)
if (e.getBlockID() == 1 || e.getBlockID() == -2)
for (int x = e.getX(); x < e.getX() + 18; x++)
for (int y = e.getY(); y < e.getY() + 18; y++)
if (x > 0 && y > 0 && x < empty.length && y < empty[x].length)
empty[x][y] = false;
This code seems to run fine in the Run mode of Eclipse but when I start the program in the Debug mode of Eclipse, the game runs really slowly and is very glitchy. Removing this block of code makes the debug mode run as smooth as the Run mode.
Does anyone know why this is happening and if it is my fault or not? It would really help :)