Closed BrendenChurch closed 10 years ago
I happened to have access to a vista computer, so I will fix this issue.
It is not as simple as adding the Main-Class: hakd.Main to the manifest file(I just tested it).
The way the build system(gradle) works is that it puts hakd.jar along with all of its dependencys' jar files in the Hakd/lib/ folder of the archive. By just running the jar, the game won't be able to find the dependencies because none are packaged inside of Hakd.jar.
I could, however, make a separate runnable jar build that has everything packaged with it. Unfortunately this would make the overall game less modable for end users(not so much for people who make have forks and make their own builds.) along with more development on the build system to get it to package the dependencies in Hakd.jar.
Thanks, I thought the Manifest Main-Class mightn't been the solution, put a tried it myself as well and it doesn't work, :(
Yeah, there is definitely a problem on vista, at least with the current uncommited source I have.
Did you have a problem starting the .bat file, or a problem after typing start [name] in the game? Because I could start the bat, but not the game from the menu.
I don't get to see start [name]
Do you see the menu at all? It will say this in green text near the top:
Terminal [version (random number)]
(your username)@127.0.0.1
Storage:
Drive[0] ...
--------------------------------------------------------
And then "type help here to get started" at the bottom.
I see the console, I see the frame, and a black screen, then it crashes
Huh, I was not able to recreate this bug on my vista machine. I was using my current code, but I have not touched the menu classes in a long time.
But you are trying to set this up, so I will wait to see if you find anything.
Get this stack trace (I added a pause in the start.bat so it wouldn't close immediately)
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.SerializationException: Error reading file: skins/uiskin.json
at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:96)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.<init>(Skin.java:73)
at hakd.gui.Assets.load(Assets.java:38)
at hakd.game.Hakd.create(Hakd.java:18)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Caused by: com.badlogic.gdx.utils.SerializationException: Error reading file: skins/uiskin.json
at com.badlogic.gdx.utils.Json.fromJson(Json.java:657)
at com.badlogic.gdx.scenes.scene2d.ui.Skin.load(Skin.java:94)
... 5 more
Caused by: com.badlogic.gdx.utils.SerializationException: Error loading bitmap font: skins/Dejavu_Sans_Mono.fnt
at com.badlogic.gdx.scenes.scene2d.ui.Skin$3.read(Skin.java:464)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$3.read(Skin.java:442)
at com.badlogic.gdx.utils.Json.readValue(Json.java:834)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$1.readValue(Skin.java:410)
at com.badlogic.gdx.utils.Json.readValue(Json.java:804)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.readNamedObjects(Skin.java:431)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.read(Skin.java:420)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$2.read(Skin.java:416)
at com.badlogic.gdx.utils.Json.readValue(Json.java:834)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$1.readValue(Skin.java:410)
at com.badlogic.gdx.utils.Json.fromJson(Json.java:655)
... 6 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Texture width and height must be powers of two: 500x400
at com.badlogic.gdx.graphics.GLTexture.uploadImageData(GLTexture.java:241)
at com.badlogic.gdx.graphics.Texture.load(Texture.java:145)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:133)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:112)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:108)
at com.badlogic.gdx.graphics.g2d.BitmapFont.<init>(BitmapFont.java:171)
at com.badlogic.gdx.graphics.g2d.BitmapFont.<init>(BitmapFont.java:152)
at com.badlogic.gdx.graphics.g2d.BitmapFont.<init>(BitmapFont.java:120)
at com.badlogic.gdx.scenes.scene2d.ui.Skin$3.read(Skin.java:461)
... 16 more
Ill try deleting it all and downloading the latest zip.
Are you running/building this from the github source, or are you running a release I built?
I know what the problem is now. OpenGL(libGDX is built on opengl) likes graphics in power of two's. As in 2^x: 32, 64, 256, 1024, just to name a few.
Also can you check which opengl version your computer supports? Some versions don't mind not having powers of two, but I am not sure why or how you would be using a different version.
I will fix the image size, but I won't make a release for another few days. I am working on cleaning up the gamescreen and room code, it is a complete mess.
I am using the release you made. I do have a pretty shitty gpu (I am upgrading soon), so it only supports like OpenGL 1.5 or something like that, so I guess I might never be able to play this :(
Oh, that makes sense. Right now it uses opengl2.0. I used to have it use opengl1.0 if there was no 2.0. I forget why I took it out, I will look into putting it back in.
Do you mind telling me which graphics card? I would like to know how old of a computer this might be able to support.
Also I did make the font image a power of two, along with adding a bunch more fonts for customization.
Intel G36/G38 Express Chipset. Its not that old, but its horrible.
Yes I reailize this is DirectX Diagnostics, not OpenGl but heres the details.
Ah, intel graphics are pretty bad. By the way, I bought a graphics for like $110 a year or two ago, and it still runs games fairly well and will for a few more years.
Well, openGL1.0 is working. It will fall back to 1.0 if 2.0 is not available.
The game will work, but 2.0 will look better. 2.0 has anti-aliasing along with shaders(only simple shaders that do nothing special yet).
Well... it looks like libgdx no longer supports openGL 1.x. The only thing I can do is use old versions of libgdx, but I will not do that, sorry.
I may try to get hakd to run with openGL 3.0 (now that it is supported), but it will always(as long as libgdx supports it) will have opengl 2.0 support.
Yeah, upgrading soon anyway
I start Hakd.bat on windows vista, and it doesn't start.
Suggestion: Add Main-Class: hakd.Main to MANIFEST.MF in META-INF in Hakd-0.0.3.jar then the program can be executed by any system with java -jar Hakd-0.0.3.jar