Closed etorth closed 7 years ago
I'm not sure but maybe https://github.com/brainless-studios/OpenRTS is more mantained...
The JME repository has moved and the gradle dependency must be updated. The new repository is located at org.jmonkeyengine.
You may look at https://github.com/methusalah/alchemist/blob/master/build.gradle and copy/paste the lines. I'm not sur that the 3.0 version of jmonkey is available. I'm sorry but I can't do that myself right now.
I am sorry if I am merely misunderstanding, but what lines am I supposed to copy? Should I replace the contents of build.gradle with the one you linked, or only replace some specific lines?
fixed with https://github.com/methusalah/OpenRTS/commit/ef277c00f4367f0339fb454796058eb55ca988e2
compiles but not tested
I'm still having some issues. Is there perhaps another step I need to accomplish before running OpenRTS for the first time?
C:\Users\Beau\Desktop\OpenRTS>gradlew.bat run Configuration on demand is an incubating feature. :core:compileJava
FAILURE: Build failed with an exception.
Could not find any version that matches com.jme3:jme3-core:[3.0.10,).
I can provide the full text if necessary, but it is highly similar to what etorth posted.
Is there perhaps a pre-requisite for using OpenRTS that I didn't consider? I have never used JMonkey before, and I want to learn so I can use your tool.
If I may: I was able to compile using (in build.gradle):
In the repos
maven { url "http://dl.bintray.com/jmonkeyengine/com.jme3" }
In the deps
compile "com.jme3:jme3-core:$jmonkeyengine_version"
compile "com.jme3:jme3-effects:$jmonkeyengine_version"
compile "com.jme3:jme3-networking:$jmonkeyengine_version"
compile "com.jme3:jme3-blender:$jmonkeyengine_version"
compile "com.jme3:jme3-bullet:$jmonkeyengine_version"
compile "com.jme3:jme3-bullet-natives:$jmonkeyengine_version"
compile "com.jme3:jme3-lwjgl:$jmonkeyengine_version"
compile "com.jme3:jme3-niftygui:$jmonkeyengine_version"
And changing a few Vector2f.interpolateLocal calls to vector2f.interpolate (interpolateLocal couldn't be found). After this, there are some runtime errors (flyCam being null).
All in all, I suspect there were some API changes in JME (though I'm not an expert).
I don't know if this is related but I get:
INFO: Audio Renderer Information
* Device: OpenAL Soft
* Vendor: OpenAL Community
* Renderer: OpenAL Soft
* Version: 1.1 ALSOFT 1.15.1
* Supported channels: 64
* ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
* AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Jan 30, 2017 9:03:44 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
Jan 30, 2017 9:03:44 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Jan 30, 2017 9:03:44 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
Jan 30, 2017 9:03:44 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
at app.MainRTS.simpleInitApp(MainRTS.java:46)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at app.OpenRTSApplication.initialize(OpenRTSApplication.java:133)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:745)
> Building 33% > :core:run
All in all, I suspect there were some API changes in JME (though I'm not an expert).
Yes it has been some changes with backward compatibility issues. I should have used a jMonkey release instead of a working branch but jMonkey was new to github at the time.
I've tried the current gradle config on a fresh install and it works. I suspect some env issues on your side. please check that you have imported the three projects in the same workspace, have refresh gradle hard, have have followed the wiki
If it is anything to note, the suggestion by mrlem did help the code compile, but now I am getting a null pointer exception at Thread[jME3 Main,5,main] when the program attempts to launch JMonkey.
I'll report back here / in a new issue if I can figure out anything about that.
@mrlem 's post above solved the dependency issues. I seem to have some compilation issues and bad symbols in the source files but that's another issue.
Edit: I see that was addressed above too :) Is that flycam being null problem going to break things?
@Protroid were you able to find a way around that problem? I'm just trying it out today and I have the same error.
I see what causes it.
OpenRTSApplication.initialize()
calls super.initialize()
(which is a Monkey class). That in turn calls the simpleInitApp
method down in MainRTS
. The flyCam
variable is referenced here. However it is initialized in OpenRTSApplication.initialize()
only after the call to super.initialize()
.
The SimpleApplication.flyCam
is hidden by OpenRTSApplication.flyCam
.
I don't know enough at this point to change anything though.
@RamakrishnanArun No, I was not able to get around the Null Pointer Exception, college is a joy :P
@methusalah can you help? I'm interested and trying to set this up.
I decided to try this on Windows after I got #107 on Linux.
I'm having a similar issue to @RamakrishnanArun and @Protroid now.
When running gradlew
, I get a black window appear which stays there (seemingly) forever until I finally close it. The build then goes off to do other things and then it errors out with
Mar 21, 2017 7:39:06 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
at com.jme3.material.Material.<init>(Material.java:108)
at view.material.MaterialManager.getColor(MaterialManager.java:62)
at view.MapView.createSky(MapView.java:89)
at view.MapView.<init>(MapView.java:55)
at Game.simpleInitApp(Game.java:27)
at app.OpenRTSApplication.initialize(OpenRTSApplication.java:160)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:745)
comment old one in build,gradle and add below maven lines ,it will solved // maven { // url 'http://updates.jmonkeyengine.org/maven' // } maven { url "http://dl.bintray.com/jmonkeyengine/com.jme3" }
After that you just need to get rid of
com.jme3.app.LegacyApplication
in app.OpenRTSApplication.java
and change LegacyApplication to Application in the class
Hi,
I'm trying to run this excellent open source software but seems the ./gradlew run
won't work, it reports following errors I am really new to all these things, could you please have a look?
Best, Anhong
Configuration on demand is an incubating feature. :core:compileJava
FAILURE: Build failed with an exception.
What went wrong: Could not resolve all dependencies for configuration ':core:compile'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 17.634 secs