Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OCaml and Scheme for game development

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.

like image 818
JJunior Avatar asked Nov 29 '10 03:11

JJunior


1 Answers

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.
like image 113
Niki Yoshiuchi Avatar answered Sep 21 '22 07:09

Niki Yoshiuchi