用于游戏开发的OCaml和Scheme

发布于 2024-10-04 20:58:35 字数 224 浏览 3 评论 0原文

这是一个更针对语言特征而不是编码的问题。

您能告诉我哪一种语言(OCaml 或Scheme??)更适合用于基本游戏开发?

我对方案和 OCaml 的了解都非常基础,我发现两者使用起来同样具有挑战性,并且无法确定在可扩展性和易用性方面哪个更好。

如果你们中的任何人对这两种语言中的任何一种拥有丰富的开发经验,请向我提供您的意见。

任何意见表示赞赏。

谢谢。

This is a question more targeted towards language features and not coding.

Could you tell me which would be a better language (OCaml or Scheme??) to use for basic game development?

My knowledge with both scheme and OCaml is pretty basic and I find both equally challenging to work with and was unable to determine which would be a better one with respect to scalability and ease of use.

If any of you guys have extensive development experience with either of the 2 languages please give me your inputs.

Any inputs appreciated.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玩世 2024-10-11 20:58:35

OCaml 和 Racket(PLT 方案)都有 OpenGL 绑定。不过,Racket 似乎没有 SDL 绑定,这对您来说可能重要也可能不重要。

Racket 使用 JIT 编译器,OCaml 可以编译为本机代码或字节代码(OCaml 有几个 JIT 编译器)。

对于 语言基准游戏。*

我个人会选择 OCaml。它可以编译为本机代码,执行速度更快,并绑定到 SDL(提供输入、声音和缓冲 2D 图形等)。

另一个值得考虑的选项是 F#,它是另一种 ML 方言。 F# 可以利用 XNA 框架。然而,XNA 会将您限制在 Windows 上(据我了解,F# 只能在 XBox 上的 dll 中使用;XNA 有 Mono 实现,但我不确定它们有多完整)。

  • 基准游戏只能让您粗略地了解语言实现的相对效率。游戏比基准游戏使用的测试复杂得多。

Both OCaml and Racket (PLT Scheme) have OpenGL bindings. It looks like Racket doesn't have SDL bindings however, which may or may not be important to you.

Racket uses a JIT compiler, OCaml can be compiled to native code or byte code (and there are a couple of JIT compilers for OCaml).

OCaml is faster than Racket for most of the benchmarks on Languages Benchmark Game.*

Personally I would choose OCaml. It can be compiled to native code, executes faster and has bindings to SDL (which provides input, sound and buffered 2D graphics, among other things).

Another option to consider is F# which is another ML dialect. F# can take advantage of the XNA framework. XNA will limit you to Windows however (from what I understand F# can only be used in dlls on the XBox; there are Mono implementations of XNA but I'm not sure how complete they are).

  • The benchmark game can only give you a rough idea of the relative efficiency of a language's implementation. A game is much more complex than the tests used by the benchmark game.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文