Hi,
I need 3d graphics for my next project and jmonkey seems perfect. The only thing I need to know is:
How is its Scala support ?
Is it possible to develop JMonkey using the Scala IDE ? Will there be useful autocompletion ? Do you know any problems, I may encounter ?
About a year ago, I looked at jmonkey for the first time and it was basically a highly customized Netbeans IDE. In order to use a good Scala plugin it was necessary to run both the jmonkey IDE as well as Eclipse and sync the files between a Scala project in Eclipse and jmonkey. I donât remember the specifics, but it wasnât exactly efficient. No offense meant, I really appreciate the great work youâve done. Maybe I just didnât do it the right way.
jmonkey platform is a superset of netbeans ide which has working scala support plug-in. i think scala should work fine, but youâd probably still be using it alongside java code.
JME is a java 3D engine.
There are plenty of pitfalls you may fall into during game development and adding another language overlay is not the wisest thing to do IMO.
@nehon There are many reasons why Iâd want to use Scala and itâs hard to find the one killer argument for it. I really enjoy the functional aspects of Scala, moreover it has fantastic collection classes. And its multithreading is just perfect.
@nordländer said
There are many reasons why Iâd want to use Scala and itâs hard to find the one killer argument for it. I really enjoy the functional aspects of Scala, moreover it has fantastic collection classes. And its multithreading is just perfect.
Yeah I understand, but you will probably run into other issues that will nil this advantages.
I mean, afaik no one tested it yetâŚso there might be issuesâŚand youâll be the first to run into them, so itâs gonna be hard to find some help.
I donât know, to me it sounds like it doesnât worth the risk.
I may give some useful input. I have been using JME3 w/ Scala for a year now. My setup is the latest Eclipse + Scala IDE + JME3 nighties. The nighties are recommended to use in case if you want the JME3 as a library, without the SDK. I have found the engine to be totally enjoyable to use w/ Scala - you get all the FP bonus, that is, and no issues at all. Two main inconviniences that I have came across are: 1) to instantiate JME3 classes, you have to use the ânewâ keyword, there are no innate companion objects and 2) In some rare occasions you have to deal with Java collections instead of Scala collections, or at least, transform them to Scala equivalents. While working with the engine I have even built a framework on top of it, which hides Javaish features in favor of the comfort. So, I understand what means âScalaâ for someone who tried it, and I would say that imho there is no reason why should not you experiment. And, surely, anyway, you can use the mix of Java+Scala code in any Scala project, in case if for some reason you would like to implement some part of your code in pure Java⌠but that never happened to me
Surely, you lose all the convinience and plugins provided by the SDK, but in my experience I have never used them, the plain code was always enough (your experience may differ!!!). I figured that if I would need these conviniences, I could use the SDK to generate the files and then add them to the project.
And as a note - at first I was trying to integrate Scala with the NetBeans platform of the SDK, installing plugins and stuff. After getting a strong headache trying to make the Scala compiler work with the SDK projects, I have abandoned the idea, switching to Scala IDE and JME3 nighties instead. But that was a year ago⌠things might have changed⌠If you get any luck with this, please let me know
Thatâs very valuable input @noncom thanks!
Looks like someone did test it
The SDK is now based on Netbeans 7.2, so maybe things changed on this side.
I can confirm that the engine runs flawlessly under jruby as well. I was quite surprised by the performance I got! =) I plan to do further experimentation with jruby to see were the limits are =)
Well, I use Eclipse because I find the jMonkeyâs Netbeans IDE too slow. Then you add the Scala IDE plugin. Scala compiles to .class files.
Converting a few lines of Java to Scala is pretty painless. Thereâs less boilerplate code. Frame rate is fine. Its just like using Java, but without Java.