My project runs as it should when I test it in the SDK, but whenever I build my project and run the .jar in the dist folder something is causing it to appear glitchy and unplayable:
- If I run it in full screen the application will start with no errors, but the screen is entirely black - even the FPS and StatsView will not show up.
- If I’m not in full screen then the screen doesn’t go black, but the screen spins out of control from any mouse movement.
I think something may be wrong with my build properties or settings? This only happens with this specific project, any new projects I’ve created to test this will allow me to build and run the jar perfectly fine.
I also don’t believe it could be something with my code; I narrowed down the Main class in this project so that it doesn’t actually start my game and runs just like a default, empty project, minus the red cube.
public class Main extends SimpleApplication{
public static Main app;
public AppController appController;
private static float width, height;
private static GraphicsDevice device;
public static void main(String[] args) {
app = new Main();
app.setShowSettings(true);
// app.setDisplayStatView(true);
// app.setDisplayFps(true);
//
// device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
// width = device.getDisplayMode().getWidth() * .97f;
// height = device.getDisplayMode().getHeight() * .9f;
//
// AppSettings settings = new AppSettings(true);
// settings.put("Width", ((int)width));
// settings.put("Height", ((int)height));
// settings.put("Title", "The Afflicted Forests");
// settings.put("VSync", true);
// settings.put("GammaCorrection", true);
// settings.put("Samples", 8);
//
// app.setSettings(settings);
app.start();
}
@Override
public void simpleInitApp() {
// appController = new AppController(app, height, width);
// appController.toMainMenu();
}
private float interval = 5f;
@Override
public void simpleUpdate(float tpf) {
}
@Override
public void stop(){
// appController.cleanUp();
super.stop();
}
}
I also have built this project with both 3.1 and 3.2 on the same device, I’m not sure if that could be a relevant reason as to where I could have messed up any build settings, but I don’t recall ever changing anything in my project properties aside from the memory usage parameters, and I unfortunately went a long time without testing the jar in my /dist folder so I don’t know when this started happening