Built Jar file for distribution

I have several questions.

1st. When I run my game from command line java -jar TimePilot.jar after a do a build for distribution, I get a screen looks like this. The colors are really off, they are much lower in brightness.

2nd. when I run the same Jar file through the EXE file. I get this. The screen resolution is really off. Colors are still off but like option 1.

3rd. when I run the program through IDE (Eclipse or Netbeans), I get the following:

See how much more deep the colors are.

What is causing the difference between a build and running through IDE environment that could cause the output color to be different???

I don’t have a clue where to start.

1 Like

May be Gamma correction, Gamma correction is turned on by default for jme3.4.0.

Which jme3 version are you using ?

1 Like

I’m using 3.4 inside the IDE and for distribution. Here is my settings file that I use for development.

And that is it. The settings files was not copied over for distribution . Only issue now is when launching through the EXE file. The offset it and screen size is wrong.

Thanks for the idea of the gamma issue.

#jME3 AppSettings
#Tue Nov 16 23:13:55 CST 2021
Renderer(string)=LWJGL-OpenGL33
Width(int)=-1
DisableJoysticks(bool)=false
SettingsDialogImage(string)=/com/jme3/app/Monkey.png
color(float)=0.0
Title(string)=Time Pilot
Height(int)=-1
volume(float)=0.0
Samples(int)=0
Resizable(bool)=false
OpenCLPlatformChooser(string)=com.jme3.opencl.DefaultPlatformChooser
UseInput(bool)=true
BitsPerPixel(int)=24
GammaCorrection(bool)=false
Frequency(int)=60
DepthBits(int)=24
Fullscreen(bool)=true
AudioRenderer(string)=LWJGL
StencilBits(int)=0
VSync(bool)=true
FrameRate(int)=-1
OpenCL(bool)=false
MinHeight(int)=0
MinWidth(int)=0
SwapBuffers(bool)=true
crtMode(int)=0

1 Like

https://javadoc.jmonkeyengine.org/v3.4.0-stable/com/jme3/system/AppSettings.html#setGammaCorrection-boolean-

Set it to false. If you bypass the settings dialog then do it in code.

Edit: confirm that it’s really being done, I mean. And note that if you have previously saved settings with it set to true then verify that it is reset and not pulling the value still stored in Java preferences.

2 Likes

I figured out the gamma, the settings are being loaded from a file. That got the visual color corrected.

But I don’t know why the EXE window size is wrong, running the jar file from command line manually runs it correctly.

May be the java version used to run the exe is different, and if you use a JFrame then you have to setup some code to stabilize the window appearence.