Haskell version of Crystal Space 3D?
Does anybody know any Haskell tool(s) corresponding to Crystal Space 3D ( see http://www.crystalspace3d.org/tikiwiki/tiki-view_articles.php )? To quote from "About Crystal Space" ( see http://www.crystalspace3d.org/tikiwiki/tiki-index.php?page=About+Crystal+Spa... ), "Crystal Space is a free (LGPL) and portable 3D Game Development Kit written in C++. It supports: true six degrees of freedom, colored lighting, lightmapped and stencil based lighting, shader support (CG, vertex programs, fragment programs, ...), mipmapping, portals, mirrors, alpha transparency, reflective surfaces, 3D sprites (frame based or with skeletal animation using cal3d animation library), procedural textures, particle systems, halos, volumetric fog, scripting (using Python, Perl, Java, or potentially other languages), 16-bit and 32-bit display support, OpenGL, and software renderer, font support (also with freetype), hierarchical transformations, physics plugin based on ODE, ... See the extensive list of features for more details." The reason that I ask is that I would like to learn how to write my own version of PlaneShift (a 3D fantasy MMORPG written using Crystal Space 3D) with Haskell, instead of C++, if possible. However, I haven't been able to find any Haskell tools or libraries specific enough for this kind of project. Many thanks, Benjamin L. Russell
Benjamin L. Russell:
Does anybody know any Haskell tool(s) corresponding to Crystal Space 3D ( see http://www.crystalspace3d.org/tikiwiki/tiki-view_articles.php )?
The "simplest" solution would probably be to write a Haskell binding to the Crystal Space 3D library. However, as Crystal Space 3D is huge, that's a significant effort. This would be much like the existing binding to OpenGL http://haskell.org/HOpenGL/ only that Crystal Space 3D provides higher-level functionality. Manuel PS: See http://www.haskell.org/tmrwiki/Bzlib2Binding to get an idea what is involved in producing library bindings.
--- Manuel M T Chakravarty <chak@cse.unsw.edu.au> wrote:
The "simplest" solution would probably be to write a Haskell binding to the Crystal Space 3D library. However, as Crystal Space 3D is huge, that's a significant effort. This would be much like the existing binding to OpenGL
only that Crystal Space 3D provides higher-level functionality.
Thank you for the links. Two questions: 1) Would a Haskell counterpart to Crystal Space 3D, if implemented, potentially be fast enough to run a project similar to the 3D real-time Crystal Space 3D-based MMORPG "PlaneShift" ( see http://www.planeshift.it/main_01.html ) on Mac OS X 10.2.8 Jaguar or above? 2) For a hobbyist programmer with a computer science algorithms background including some coursework in lambda-calculus, with some programming background in Scheme and C, and with some knowledge of Java, for the purpose of writing a project similar to "PlaneShift," which of the following options would more likely be easier to accomplish? Option A) Use the existing Java scripting support already available in Crystal Space 3D, and deal with debugging potentially larger programs in Java. Option B) Write a Haskell binding for the existing Crystal Space 3D libraries, and then deal with debugging potentially smaller programs in Haskell. I have written some programs in Scheme, C, and Java, but have only audited some lectures, written a few programs, and studied a few chapters on Haskell so far. Any advice would be appreciated. Thanks again, Benjamin L. Russell
Two questions:
1) Would a Haskell counterpart to Crystal Space 3D, if implemented, potentially be fast enough to run a project similar to the 3D real-time Crystal Space 3D-based MMORPG "PlaneShift" ( see http://www.planeshift.it/main_01.html ) on Mac OS X 10.2.8 Jaguar or above?
2) For a hobbyist programmer with a computer science algorithms background including some coursework in lambda-calculus, with some programming background in Scheme and C, and with some knowledge of Java, for the purpose of writing a project similar to "PlaneShift," which of the following options would more likely be easier to accomplish?
Option A) Use the existing Java scripting support already available in Crystal Space 3D, and deal with debugging potentially larger programs in Java.
Option B) Write a Haskell binding for the existing Crystal Space 3D libraries, and then deal with debugging potentially smaller programs in Haskell.
I have written some programs in Scheme, C, and Java, but have only audited some lectures, written a few programs, and studied a few chapters on Haskell so far.
As it turns out, there is a pretty large conceptual gap between the design of most object oriented libraries and idiomatic Haskell. This makes writing useful bindings in Haskell for such libraries a tricky business. If you want it to be easy, I'd say stick with an OO language that will more closely match the design (caveat: I am not familiar with the design of CS, but I assume it is OO because its written in C++). If you want to learn more about Haskell, then the ease question takes a back seat. To be honest, I don't think there is any easy way to tackle a project of this size -- the planeshift people et al have been working on this for a long time. As to performance, I suspect it would be OK, if you were sufficiently good with a profiler.
--- robert dockins <robdockins@fastmail.fm> wrote:
As it turns out, there is a pretty large conceptual gap between the design of most object oriented libraries and idiomatic Haskell. This makes writing useful bindings in Haskell for such libraries a tricky business. If you want it to be easy, I'd say stick with an OO language that will more closely match the design (caveat: I am not familiar with the design of CS, but I assume it is OO because its written in C++). If you want to learn more about Haskell, then the ease question takes a back seat.
Thank you; that's what I was suspecting. In that case, I'll see if I can use the existing Java scripting support for the Crystal Space 3D libraries.
[comments deleted]
As to performance, I suspect it would be OK, if you were sufficiently good with a profiler.
Thank you; in that case, I should probably learn Haskell for my next project. Alternatively, if Sebastian Sylvan (or anybody else) completes the Haskell scripting support for Crystal Space 3D before I start actually using it, then maybe I'll learn Haskell much sooner. If only there were Haskell scripting support for Crystal Space 3D, Haskell would probably be the better choice overall to write the majority of the project. Many thanks, Benjamin L. Russell
On 6/22/05, Benjamin L. Russell <dekudekuplex@yahoo.com> wrote:
Two questions:
1) Would a Haskell counterpart to Crystal Space 3D, if implemented, potentially be fast enough to run a project similar to the 3D real-time Crystal Space 3D-based MMORPG "PlaneShift" ( see http://www.planeshift.it/main_01.html ) on Mac OS X 10.2.8 Jaguar or above?
Most likely yes. For several reasons. First of all the bulk of the hard work is still being done in C and C++. Crystal Space is in C++ so all the engine stuff is still done there and the drivers are probably written in C (perhaps with some asm) and a pretty large amount of time is spent there. Second, unless you're doing some _really_ significant processing (stencil shadows, which invovles lots of geomtry processessing, see Doom3 which is pretty CPU-bound) on the CPU side you're going to be GPU bound for pretty much any game. Basically, no matter what you do (within reason) on the CPU is going to make much of a difference compared to, say, optimizing the number of draw calls you send to the driver. I see no problem writing 3D games in Haskell speed-wise. /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862
On 6/21/05, Benjamin L. Russell <dekudekuplex@yahoo.com> wrote:
Does anybody know any Haskell tool(s) corresponding to Crystal Space 3D ( see http://www.crystalspace3d.org/tikiwiki/tiki-view_articles.php )?
To quote from "About Crystal Space" ( see http://www.crystalspace3d.org/tikiwiki/tiki-index.php?page=About+Crystal+Spa... ),
"Crystal Space is a free (LGPL) and portable 3D Game Development Kit written in C++. It supports: true six degrees of freedom, colored lighting, lightmapped and stencil based lighting, shader support (CG, vertex programs, fragment programs, ...), mipmapping, portals, mirrors, alpha transparency, reflective surfaces, 3D sprites (frame based or with skeletal animation using cal3d animation library), procedural textures, particle systems, halos, volumetric fog, scripting (using Python, Perl, Java, or potentially other languages), 16-bit and 32-bit display support, OpenGL, and software renderer, font support (also with freetype), hierarchical transformations, physics plugin based on ODE, ... See the extensive list of features for more details."
The reason that I ask is that I would like to learn how to write my own version of PlaneShift (a 3D fantasy MMORPG written using Crystal Space 3D) with Haskell, instead of C++, if possible. However, I haven't been able to find any Haskell tools or libraries specific enough for this kind of project.
I haven't looked at Crystal Space in a while, but does it have some sort of scripting interface? So you write a C++ class which implements a ton of game-related functions that the game engine then calls to set up the game etc., and in those member functions you can call Haskell functions (via FFI). I'll look into this more this coming fall, if it's possible, I will write a Haskell scripting interface to Crystal Space then (I'm taking a course which involves writing plugins to CS). /S -- Sebastian Sylvan +46(0)736-818655 UIN: 44640862
--- Sebastian Sylvan <sebastian.sylvan@gmail.com> wrote:
I haven't looked at Crystal Space in a while, but does it have some sort of scripting interface?
According to "About Crystal Space" ( see http://www.crystalspace3d.org/tikiwiki/tiki-index.php?page=About+Crystal+Spa... ), Crystal Space 3D reportedly "supports ... scripting (using Python, Perl, Java, and potentially other languages)...," so it probably does.
[comments deleted]
I'll look into this more this coming fall, if it's possible, I will write a Haskell scripting interface to Crystal Space then (I'm taking a course which involves writing plugins to CS).
That would be wonderful. Please keep me posted if you do write it. (Since my mail filter automatically sorts anything sent to or cc'd to "haskell@haskell.org" to my "Haskell Mailing List" folder, please be sure to send me a separate e-mail message from the one to this mailing list then if possible.) Many thanks, Benjamin L. Russell
participants (4)
-
Benjamin L. Russell -
Manuel M T Chakravarty -
robert dockins -
Sebastian Sylvan