Gameplay, a cross-platform 3D engine, now works with Haxe!

1,990 views
Skip to first unread message

Mihail Ivanchev

unread,
Nov 30, 2012, 3:38:12 PM11/30/12
to haxe...@googlegroups.com, seta...@rim.com
Hey Haxe,

3 weeks ago I set sail to provide Haxe bindings for the Gameplay cross-platform 3D engine by RIM in order to give you a nice Christmas present. Many people were wishing for such a beast recently. Today I can announce: 95% of Gameplay works with Haxe already! Gameplay also provides: audio, input, physics, Lua scripting, AI framework etc. so you'll need nothing else. And guess what? Everything is usable with Haxe, even Lua. With the power of hxcpp and it's CFFI, I've managed to provide direct bindings to Gameplay and make it available in Haxe. Oh, yes, I forgot you're not easily convinced by words, so here's Bunnymark for you, done with Gameplay in Haxe:

(Patched HXCPP to compile):  https://dl.dropbox.com/u/13798573/hxcpp.zip

The benchmark was coded by Erin Gunn a.k.a MaskedPixel. Gameplay requires a fairly high version of OpenGL, so it might not work for you. My build script supports only Windows for now, although Gameplay itself supports many platforms. If someone feels he could support me to add the missing platforms, please get in touch with me, here's the current script for the NDLL compilation:


It's not hard, I just miss the time for it :)

Anyhow, within the next days I will finish porting the rest 5% of the classes, will port the 3D samples, will open a public repository and will wrap up for haxelib. Everything should be available for Christmas or at least New Year's Eve. It's important to understand that it's working now as well. I just have to wrap it up properly for distribution via haxelib; everyone in need of the project could obtain it from me and do whatever they want. Just contact me.

WHAT WORKS ALREADY:

Everything works, you can begin immediately: load fonts, models, images, scenes, use LUA etc. 95% of the engine are functional.

PLEASE UNDERSTAND:

This is not intended to compete with NME. Gameplay is a 3D engine, so it doesn't really matter at all if the benchmark delivers less than NME, so please do not comment on this or that being better, they were designed for different purposes. When it comes to fully-featured 3D use, Gameplay delivers nicely.

FEW WORDS ABOUT GAMEPLAY: 

Gameplay is a wonderful 3D engine developed by RIM, it enjoys active support and a friendly community, it features an extremely streamlined tool-chain which allows you to develop very rapidly. With Gameplay you can change and tweak everything on every level of abstraction: use custom shaders and meshes, mess up with OpenGL or load whole COLLADA scenes, it's up to you and your needs, you have the freedom. It also provides physics through Bullet, input and audio support, an AI system etc. It supports most of the major formats and you can even load entire scenes.

I hope you'll like it and thanks Haxe for being such an awesome platform to develop with.

Regards,
Mihail

Franco Ponticelli

unread,
Nov 30, 2012, 3:43:42 PM11/30/12
to haxe...@googlegroups.com, seta...@rim.com
Very nice ;)

Franco


Tarwin Stroh-Spijer

unread,
Nov 30, 2012, 4:07:06 PM11/30/12
to haxe...@googlegroups.com
Very cool. And nice simple code in the example!



Tarwin Stroh-Spijer
_______________________

Touch My Pixel
http://www.touchmypixel.com/
cell: +1 650 842 0920
_______________________

Rezmason

unread,
Dec 1, 2012, 12:46:44 PM12/1/12
to haxe...@googlegroups.com, seta...@rim.com
Pretty sweet! Is there a complete list of supported platforms somewhere?

Mihail Ivanchev

unread,
Dec 1, 2012, 12:49:02 PM12/1/12
to haxe...@googlegroups.com
From: http://gameplay3d.org/index.php

Supported Platforms

BlackBerry 10 and PlayBook 2.0
Apple iOS 5.1 for iPhone and iPad
Google Android 2.3+
Microsoft Windows 7
Apple Mac OS X
Linux

On Sat, Dec 1, 2012 at 6:46 PM, Rezmason <jeremy...@gmail.com> wrote:
Pretty sweet! Is there a complete list of supported platforms somewhere?

--

Rob Fell

unread,
Dec 1, 2012, 1:42:52 PM12/1/12
to haxe...@googlegroups.com
Very exciting, well done sir!

Chris D

unread,
Dec 1, 2012, 5:58:31 PM12/1/12
to haxe...@googlegroups.com, seta...@rim.com
Congrads looks like a very appealing choice for 3d with Haxe. Thanks for all your hard work.

tommaso1974

unread,
Dec 2, 2012, 4:05:28 AM12/2/12
to haxe...@googlegroups.com, seta...@rim.com
Thanks so much for this christmas gift.

I tried to compile FD project but I have a number of errors, like this for example:

src/org/gameplay3d/Vector4.hx:13: characters 11-33 : Method get required by property x is missing

Thanks

Mihail Ivanchev

unread,
Dec 2, 2012, 4:17:09 AM12/2/12
to haxe...@googlegroups.com
Download the latest Haxe nightlies, I am trying to be compatible to Haxe 3 so I use new style properties. If it's not added already (but I think it is), add -Dhaxe3 to the command line. For instance with the builds from Jan Flanders: http://haxer.be/builds/

Regards

Nicolas Cannasse

unread,
Dec 2, 2012, 4:42:21 AM12/2/12
to haxe...@googlegroups.com
Le 02/12/2012 10:17, Mihail Ivanchev a �crit :
> Download the latest Haxe nightlies, I am trying to be compatible to Haxe
> 3 so I use new style properties. If it's not added already (but I think
> it is), add -Dhaxe3 to the command line. For instance with the builds
> from Jan Flanders: http://haxer.be/builds/

If you want to be compatible with both 2.x and 3.x you can use set_x and
get_x for a x property.

Best,
Nicolas

Mihail Ivanchev

unread,
Dec 2, 2012, 4:48:55 AM12/2/12
to haxe...@googlegroups.com
Ah, yes, I was completely ignoring this fact, will change the properties today in the evening! Thanks.

On Sun, Dec 2, 2012 at 10:42 AM, Nicolas Cannasse <ncan...@gmail.com> wrote:
Le 02/12/2012 10:17, Mihail Ivanchev a écrit :

Download the latest Haxe nightlies, I am trying to be compatible to Haxe
3 so I use new style properties. If it's not added already (but I think
it is), add -Dhaxe3 to the command line. For instance with the builds
from Jan Flanders: http://haxer.be/builds/

If you want to be compatible with both 2.x and 3.x you can use set_x and get_x for a x property.

Best,
Nicolas

Jiri Musil

unread,
Dec 2, 2012, 6:46:42 AM12/2/12
to haxe...@googlegroups.com, seta...@rim.com
Amazing present, thank youuuuu.

tommaso1974

unread,
Dec 2, 2012, 7:34:05 AM12/2/12
to haxe...@googlegroups.com, seta...@rim.com
Thanks

I had downloaded the Haxe nightlies and all work fine.
Is there a way for using debug with FD?

Regards
Tommaso

Mihail Ivanchev

unread,
Dec 2, 2012, 10:41:49 AM12/2/12
to haxe...@googlegroups.com
I don't know if you can integrate native debuggers with FlashDevelop. I use gdb or Microsoft's debugger. The NDLL I send you though is a release version. If you want to engage in some active development I can send you the debug version. Please keep in touch if you make some tests :)

Regards,
Mihail

Dion Whitehead Amago

unread,
Dec 2, 2012, 5:40:48 PM12/2/12
to haxe...@googlegroups.com, seta...@rim.com
Does it compile to lua, or direct to native?

Mihail Ivanchev

unread,
Dec 2, 2012, 5:47:48 PM12/2/12
to haxe...@googlegroups.com
It compiles DIRECTLY to native, but you can use Lua for scripting if you feel like it.

On Sun, Dec 2, 2012 at 11:40 PM, Dion Whitehead Amago <dio...@gmail.com> wrote:
Does it compile to lua, or direct to native?

--

Dion Whitehead Amago

unread,
Dec 2, 2012, 6:24:07 PM12/2/12
to haxe...@googlegroups.com
Cool.

Not meaning AT ALL to downplay your work, which I think is awesome:

There's a huge advantage to building with non-compiled languages.  It means you can push updates during development of assets or code or both skipping the compilation step.

Ben Garney's new game engine uses this, and so does Spaceport.IO.  It enables artists and developers to iterate *extremely* quickly on development in real time, seeing the results of their changes on all devices of interest, and avoids the time consuming round loop of artist/asset processing/developer before seeing the results of changes in art assets.

Not only assets but game code (levels, tweaking game data) can be updated this way.

Anyway, this is still possible with your work, if a haxe->lua compiler is ever done.

Again, this is awesome work.  I'd just thought to put this idea here because the context is relevant.

tommaso1974

unread,
Dec 3, 2012, 5:46:37 AM12/3/12
to haxe...@googlegroups.com, seta...@rim.com
Hi

I haven't build an ndll but this will be a chance for understand much more about haxe.
In the next few days I will try to build the ndll for linux.
In case of problems i doing you same questions :-)

I will try, also, if there's a possibility about to integrate native debuggers in FlashDevelop.

Regards
Tommaso

Mihail Ivanchev

unread,
Dec 3, 2012, 5:50:13 AM12/3/12
to haxe...@googlegroups.com
Hey Tommaso, yesterday I have succeeded building a version for Linux. I will make it public probably today, but I can send it to you right away if you want to conduct experiments :) Because of some issues with -fPIC in Gameplay this would work for 32bit Linux only currently :/ If you find a way to use a 32bit NDLL from a 64bit executable (I didn't try) it will work for you also.

Regards,
Mihail 

tommaso1974

unread,
Dec 4, 2012, 4:45:22 AM12/4/12
to haxe...@googlegroups.com, seta...@rim.com
Hi Mihail

Sorry if I reply so later.

I don't have a machine with Linux64 installed; I will install one this evening  via VirtualBox/VmWare or Wubi.
If you send me the zip file for Linux i can test it.
Could you send me also the file for build ndll in Linux? I want try to build it

I have a question
Is there a way for doing a standard C/C++ make file from haxe build.xml file?

Regards
Tommaso

Mihail Ivanchev

unread,
Dec 4, 2012, 4:48:02 AM12/4/12
to haxe...@googlegroups.com
Give me 20 minutes to prepare it :) You'll need a 32 bit Linux to build it. Regarding the xml -> make file, I am not aware of any (painless) way of doing it :)

tommaso1974

unread,
Dec 4, 2012, 5:03:18 AM12/4/12
to haxe...@googlegroups.com, seta...@rim.com
In meanwhile install a virtual machine with Linux 32-bit.

Mihail Ivanchev

unread,
Dec 4, 2012, 6:23:14 AM12/4/12
to haxe...@googlegroups.com
OK, sorry it took a whie, here is the project:


It contains a 32bit Windows & Linux Gameplay static library. To compile the NDLL go to project/ and and:

haxelib run hxcpp Build.xml

Ignore the tools/ directory. It's not needed when you want to compile the NDLL. The generated NDLL is in bin/.

The compilation requires the patched version of HXCPP:


It fixes issues #205 and #206. Contact me if you run into trouble.

I could prepare a talk for the next WWX explaining in detail how the bridge works, because there are quite some feats. If you don't understand something, ask me.

Regards

chunbiao huang

unread,
Dec 6, 2012, 2:45:03 AM12/6/12
to haxe...@googlegroups.com
Nice Job !very useful !
 thank

2012/12/4 Mihail Ivanchev <miha...@gmail.com>

chunbiao huang

unread,
Dec 6, 2012, 4:31:28 AM12/6/12
to haxe...@googlegroups.com
C:\Motion-Twin\Haxe\lib\hxcpp\2,10,2//src/hx/StdLibs.cpp(133) : error C2065: 'ATTACH_PARENT_PROCESS' : undeclared identifier
C:\Motion-Twin\Haxe\lib\hxcpp\2,10,2//src/hx/StdLibs.cpp(133) : error C3861: 'AttachConsole': identifier not found
C:\Motion-Twin\Haxe\lib\hxcpp\2,10,2//src/hx/StdLibs.cpp(134) : error C3861: 'GetConsoleWindow': identifier not found
Called from ? line 1
Called from BuildTool.hx line 1342
Called from BuildTool.hx line 591
Called from BuildTool.hx line 626
Called from BuildTool.hx line 760
Called from BuildTool.hx line 843
Uncaught exception - Error in building thread
Error : Build failed


2012/12/6 chunbiao huang <huangc...@gmail.com>

Mihail Ivanchev

unread,
Dec 6, 2012, 4:33:29 AM12/6/12
to haxe...@googlegroups.com
When do you get this? Seems to come from hxcpp, get in touch with me on Skype: Mihail121 and we'll solve it. I can also send you a new and much improved version.

tommaso1974

unread,
Dec 6, 2012, 4:50:27 AM12/6/12
to haxe...@googlegroups.com, seta...@rim.com
Hi Mihail

I did not use Ubuntu 64 bit on my laptop because I have problems with the video card and wifi.
I spent 2 hours with VirtualBox and after all, Virtual Machine does not work fine (be careful if using VirtualBox for this platform ).
Finaly i had using vmware player.

when compiling i recived this error:

In file included from ./src/HaxeAPI.cpp:2:0:
./src/HaxeAPI.h:4:22: fatal error: gameplay.h: No such file or directory
compilation terminated.

Called from ? line 1
Called from BuildTool.hx line 1342
Called from BuildTool.hx line 591
Called from a C function

Called from BuildTool.hx line 626
Called from BuildTool.hx line 760
Called from BuildTool.hx line 804
Called from BuildTool.hx line 227
Uncaught exception - Error : 256 - build cancelled

I download gameplay but there's a specified place to unzip it on fileSystem?
Is there some enviroment configuration to do before compile?

Regards
Tommaso

chunbiao huang

unread,
Dec 6, 2012, 4:52:54 AM12/6/12
to haxe...@googlegroups.com
i use http://haxer.be/builds/windows/haxe_latest.zip  
Success to  compile hxcpp  2.10.1  but no mouse Event

Failed to compile hxcpp 2,10,2
 https://dl.dropbox.com/u/13798573/hxcpp.zip

2012/12/6 Mihail Ivanchev <miha...@gmail.com>

chunbiao huang

unread,
Dec 6, 2012, 4:57:15 AM12/6/12
to haxe...@googlegroups.com
haxelib run hxcpp Build.xml
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
Called from ? line 1
Called from BuildTool.hx line 1342
Called from BuildTool.hx line 591
Called from BuildTool.hx line 618
Called from C:\Motion-Twin\haxe/std/neko/_std/sys/io/File.hx line 33
Uncaught exception - [file_contents,Build.xml]

2012/12/6 chunbiao huang <huangc...@gmail.com>

Mihail Ivanchev

unread,
Dec 6, 2012, 4:58:06 AM12/6/12
to haxe...@googlegroups.com
OK, the top directory of gameplay must be in the SAME directory as gameplay-hx:

gameplay/
gameplay-hx/

if it's not yet called gameplay, rename it :) It was previously necessary to patch Gameplay's source, but with the latest version it's not. Get the latest version here:


It doesn't include the gameplay.lib static, compile gameplay and put the library in:

gameplay-hx/project/lib/windows/x86 | x64

Then do:

haxelib run hxcpp Build.xml

If you dont want to compile gameplay, I can send you my static library. Sorry for the hussle, you can all contact me on Skype for more help or G+.

Regards

--

Mihail Ivanchev

unread,
Dec 6, 2012, 5:00:28 AM12/6/12
to haxe...@googlegroups.com
This "latest" is not really latest, install this but also unzip http://haxer.be/builds/windows/haxe_latest.zip in the c:\motion-twin\haxe directory or whereever your haxe resides to override the previous executable and std library.

Tommaso grenga

unread,
Dec 6, 2012, 5:15:50 AM12/6/12
to haxe...@googlegroups.com
No hustle

I did not think that VirtualBox had these problems for Linux 64 bit.
I installed also Fedora 64 bit and had the same problem.
I'm not a lucky man :-)

I will try asap to compile gameplay.lib and the gameplay-hx.zip.

Thanks
Tommaso

Mihail Ivanchev

unread,
Dec 6, 2012, 5:47:12 AM12/6/12
to haxe...@googlegroups.com
Hey Tommaso & everyone else,

I compiled and included a Gameplay static library for x86 Windows for your convenience: https://dl.dropbox.com/u/13798573/gameplay-hx.zip

I also ported the first 3D sample in Gameplay, in case you're interested:


I think the official GitHub repository will be set next week and the first Haxelib release in 2 weeks!

Regards,
Mihail

Stefan

unread,
Dec 10, 2012, 1:56:58 PM12/10/12
to haxe...@googlegroups.com, seta...@rim.com
Hi Mihail, great work, I'm really looking forward to try this out! :)
At the moment I can compile and run the mesh-sample succesfully, the duck rotates, but when I move the mouse, the app crashes. But I will wait for the github repo and try again!

Thanks,
Stefan

Mihail Ivanchev

unread,
Dec 10, 2012, 2:02:32 PM12/10/12
to haxe...@googlegroups.com
Ah, cool, thanks for the input, you can contact me on Skype so I could send you latest version with some bug fixes!

Regards,
Mihail

--

Stefan

unread,
Dec 10, 2012, 2:45:40 PM12/10/12
to haxe...@googlegroups.com
I don't use skype, but it's no problem... I can wait for the github repo!
Regards,
Stefan
Reply all
Reply to author
Forward
0 new messages