Scala 中有游戏引擎吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1048801/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 01:28:52  来源:igfitidea点击:

Is there any game engine in Scala?

javascalagame-engine

提问by Roman Kagan

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

我想知道是否有任何用 Scala 编写或易于从 Scala 访问的游戏引擎?

采纳答案by Peter Kofler

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

由于简单的 Java 集成,所有 Java 游戏引擎都可以轻松访问。有几种(没有以任何方式排序):

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 Minutesthat applies as well.

一个很好的演示如何开始用 Java编写游戏代码是在不到 50 分钟内用 Java 编程语言编写 3-D 游戏也适用。

As Scala has a nice Java integrationthe 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.

由于Scala 具有很好的 Java 集成,因此 ointerop 应该很容易。正如 mcherm 指出的那样,对于lwjgl,这已经完成了。为了有很好的 Scala 感觉,您可以添加一些隐式转换

回答by darkfrog

I am currently working on a 3d engine in Scala: http://www.sgine.org

我目前正在 Scala 中开发 3d 引擎: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. :)

在成为主要 Java 引擎的竞争对手之前,它还有很长的路要走,但正在取得良好的进展,并且总是感谢更多的帮助。:)

回答by mcherm

Hereis 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.

是某人使用来自 Scala 的 LWJGL 之类的库的示例。这似乎是您最好的计划——与一个好的 Java 库集成。Scala 和 Java 之间的集成非常强大:为了使用这样的库,您需要“双向”集成:从您的 Scala 调用 Java 代码(执行诸如绘制到屏幕之类的操作)并从您的Scala 代码(做诸如响应事件之类的事情)。幸运的是,Scala 可以很容易地做到这两点。

回答by Lex

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.

工作中有这样的引擎。现在我正在构建一个坚实的基础,并通过一个易于使用的数学库通过编译器插件进行优化。数学部分已经完成,包括用于设置相机的所有向量、矩阵、四元数、旋转和投影,并准备好开箱即用地插入 opengl。一个简单的渲染器将在近处特征中完成。编译器插件需要时间。

Link: Simplex3d

链接:Simplex3d

回答by ePharaoh

ScalaBox2D

ScalaBox2D

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

不过,它可能不是一个成熟的游戏引擎。(我不知道我从来没有写过大型游戏)。

回答by HamoriZ

There is a 2D game engine : Scage

有一个2D游戏引擎:Scage

回答by Kajetan Abt

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

对于 Java,还有 Slick2d,它已经非常成熟并且仍然活跃。在 Scala 中的集成一如既往地简单。