1
D / DSFML (a port to the D language)
« on: April 15, 2008, 12:40:51 am »
Hi!
I've recently picked up on the D language (http://www.digitalmars.com/d/) and wanted to start developing some games for it. But D can only directly link to C object files and not C++ and because of that the only multimedia libraries availiable have C bindings.
Therefore I decided to create a port of the SFML library with the goal of providing an interface as close to the C++ version as possible. I use version 1.2 as the reference since I wanted a stable interface to port so that the interface wouldn't change as I ported it.
Currently I have as good as ported the whole Window interface aswell as the Win32 implementation. (I haven't implemented joystick support yet, but it would be just a matter of converting the C++ code to D.) The interface is almost identical to the one found in C++. The only differences are the use of .'s instead of :'s and the use of modules and imports instead of header files. Which makes the tutorials still apply with some minor changes.
Some parts of the System package are also ported as they are required by the Window package. Cross-platform threads and mutexes are implemented by the D standard library so there's not much need for porting them.
Currently the Win32 implementation of the Window interface is all I need, so I probably won't be adding other packages to the port unless I find them useful in the future.
If anyone's interested in taking a look or maybe port other parts of SFML I'd happily send it over.
I've recently picked up on the D language (http://www.digitalmars.com/d/) and wanted to start developing some games for it. But D can only directly link to C object files and not C++ and because of that the only multimedia libraries availiable have C bindings.
Therefore I decided to create a port of the SFML library with the goal of providing an interface as close to the C++ version as possible. I use version 1.2 as the reference since I wanted a stable interface to port so that the interface wouldn't change as I ported it.
Currently I have as good as ported the whole Window interface aswell as the Win32 implementation. (I haven't implemented joystick support yet, but it would be just a matter of converting the C++ code to D.) The interface is almost identical to the one found in C++. The only differences are the use of .'s instead of :'s and the use of modules and imports instead of header files. Which makes the tutorials still apply with some minor changes.
Some parts of the System package are also ported as they are required by the Window package. Cross-platform threads and mutexes are implemented by the D standard library so there's not much need for porting them.
Currently the Win32 implementation of the Window interface is all I need, so I probably won't be adding other packages to the port unless I find them useful in the future.
If anyone's interested in taking a look or maybe port other parts of SFML I'd happily send it over.