Question

I wonder if there are any game engine written in Scala or easily accesible from Scala?

Was it helpful?

Solution

All the Java gaming engines are easily accessible due to easy Java integration. There are several (not sorted in any way):

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.

OTHER TIPS

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. :)

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.

ScalaBox2D

It's probably not a full fledged game engine though. (I dunno I have never written large games).

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

There is a 2D game engine : Scage

For java, there is also Slick2d, which is pretty far developed and still active. Integration in Scala is easy as always.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top