I wonder if there are any game engine written in Scala or easily accesible from Scala?
7 Answers
All the Java gaming engines are easily accessible due to easy Java integration. There are several (not sorted in any way):
- http://www.jmonkeyengine.com/
- http://www.13thmonkey.org/~boris/jgame/
- https://jge.dev.java.net/
- http://www.lwjgl.org/
- https://sourceforge.net/projects/tjger/
A good presentation how to start coding a game in Java is Write a 3-D Game in the Java Programming Language in Less Than 50 Minutes that applies as well.
As Scala has a nice Java integration the ointerop should be easy. As mcherm pointed out, for lwjgl this has already been done. To have the nice Scala feel you could add some implicit conversions.

- 25,759
- 22
- 127
- 221

- 9,252
- 8
- 51
- 79
-
7+1. However, I doubt these java libraries make you easy to apply the nice features of scala (closures and what not). – akarnokd Jun 26 '09 at 12:32
-
1Except for Scala implicit conversions of course; you can make anything scala-fied – oxbow_lakes Jun 26 '09 at 18:18
-
+1 for leveraging the Java libraries. had good experiences with jMonkeyEngine in particular - I think it's a great basis for Scala games – mikera May 09 '11 at 15:33
-
Note that implicit conversions, although nice, can be problematic in performance limited devices like Android due to the fact they create new objects and cause extra GC. Other than that, using Java game engines is really easy from Scala and functional structures make many non-performance-critical parts short and easy to read. I've been keeping a blog about developing Android game with Scala at http://scalandroid.blogspot.com/ – vertti Apr 21 '12 at 04:56
-
2[libGDX](https://github.com/libgdx/libgdx) – 0__ Sep 15 '13 at 13:27
-
Scage -http://code.google.com/p/scage/ – Adi Sep 16 '13 at 10:42
I am currently working on a 3d engine in Scala: http://www.sgine.org
It still has a long way to go before it's a competitor to the major Java engines out there, but good progress is being made and more help is always appreciated. :)

- 91
- 1
- 2
Here is an example of someone using a library like LWJGL from Scala. That seems like your best plan -- integrate with a good Java library. The integration betweeen Scala and Java is quite strong: in order to use such a library you need to integrate in "both directions": call Java code from your Scala (to do things like drawing to the screen) and also implement Java interfaces from your Scala code (to do things like responding to events). Fortunately, Scala makes it quite easy to do both.

- 6,438
- 1
- 43
- 76

- 23,999
- 10
- 44
- 50
-
"NOT be using the Scala command prompt." Why??? The Scala interpreter also creates bytecode which runs in the JVM, so it has the same interoperability. – Blaisorblade Oct 28 '13 at 01:16
It's probably not a full fledged game engine though. (I dunno I have never written large games).

- 2,926
- 2
- 17
- 11
-
Scala Dice is also scala project written with play framework and akka : http://www.hiddenoctopus.com/sjdice – Oleg Apr 22 '15 at 15:50
There is such engine in the works. Right now I am building a solid base with an easy to use math library to be optimized via compiler plugin. The math part is finished, including all the vectors, matrices, quaternions, rotations and projections for setting up the camera and ready to be plugged into opengl pretty much out of the box. A simple renderer will be done in a near feature. The compiler plugin will take time.
Link: Simplex3d

- 41
- 1
-
2Erm, why do we need two scala game engines in the tiny-already scala world. Wouldn't it be better if Lex and Matt Hicks would cooperate? – Elazar Leibovich Jul 27 '10 at 20:12
For java, there is also Slick2d, which is pretty far developed and still active. Integration in Scala is easy as always.

- 1,505
- 3
- 15
- 28