Open TheBeeMC opened 6 years ago
Hi. Thx for the Report. Can you tell me ur system details (os) and the eclipse version?
Did you edit your Run config as told?
Yes. Also using Eclipse Java IDE
What OS are you using? I can run it on Windows 7 and 10. It seems that the ressource paths are wrong.
I edited the image/box loader by using the Classloader.getResource method instead of using getClass.getResource. For me it did not change anything. Still works.. but hope this goes for you as well ^^. Pls update and tell me
I use Eclipse Oxygen Windows 10
does not work
I am using eclipse Version: Mars.2 Release (4.5.2).. dunno if this is the problem.. some friends did also not use the same eclipse version and had issues like this. And if this does not work... as well.. I can only ask you for some screenshots/outputs (run config(main class, variables) + build path + jre system library) to analyze the problem better. Sorry for this trouble.
Your (assumed) error: You are getting null pointer because of wrong resource paths. The projectile manager class is using the Classloader and cannot find the projectile xml file. It should be found within the "projectiles_sprites" directory.. Another problem could be that you are using a different encoding format for all files. I am using the "Cp1252" format
If you have any ideas to substitute the Classloader with a different stream reader, you can try to change the lines in that class and may find different approaches for loading a file within a workspace. I already used the getClass().getResourceAsStream(File file) and getClass().getClassLoader()...
I tried the latest eclipse OXYGEN 3a version https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxygen/3a/eclipse-java-oxygen-3a-win32-x86_64.zip.
And it works. Try this and select PixelCombat.java as MAIN.
How do I find to edit Maine Menu?? Credits etc??
What do you ecactly mean? You want to change the logic of the gamephases? If so, then go into classes MainMenue.java or Credits.java. Use shift+t for better searching the classes.
But did you manage to solve the previous problem?
How do you start the game? Also when I tried chosing a map then there is a bug
Can you add some screenshots please, from where you stuck right now?
Starting Game: Run PixelCombat.java as your main class then do this:
Title| press enter -> Main Menue| vs KI/vs player -> Character Selection| press V + press NUM1 (selecting chars) -> Map Selection| press enter for selection of a map
PS: So it works finally with the resource loader? Please open a new issue, if you have a different problem.
Game can't run pls fix!
Now, the file Dragon_Breath will be loaded. Exception in Application start method java.net.MalformedURLException at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at pixelCombat.projectiles.ProjectileManager.loadAll(ProjectileManager.java:160)
at pixelCombat.projectiles.ProjectileManager.init(ProjectileManager.java:63)
at pixelCombat.projectiles.ProjectileManager.(ProjectileManager.java:49)
at pixelCombat.model.PXMapHandler.(PXMapHandler.java:71)
at pixelCombat.utils.GamePhaseLoader.run(GamePhaseLoader.java:35)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
... 15 more
Fehler beim Laden der Projektile
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at pixelCombat.utils.GameEngine.musicMP3(GameEngine.java:157)
at pixelCombat.utils.GameEngine.startMenuMusic(GameEngine.java:94)
at pixelCombat.utils.GameEngine.init(GameEngine.java:89)
at pixelCombat.utils.GameEngine.(GameEngine.java:65)
at PixelCombat.start(PixelCombat.java:60)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)