Gdevelop: Adding an Haxe Exporter

Created on 26 Aug 2020  ·  7Comments  ·  Source: 4ian/GDevelop

Description

GDevelop 5 Can export his projects to HTML5, but I think this is not enough,
it could be great to generate Haxe code from the project files, in this way, GDevelop games can be easily compiled natively to desktop, mobile, web, and even consoles with the maximum of performances.

✨ enhancement 🙇‍♀️Careful thinkindesign or refactoring needed

Most helpful comment

Conveniently, 4ian wrote a blog post about it a few hours ago: https://forum.gdevelop-app.com/t/code-generation-process/27155/2?u=arthuro555

Personally I think a haxe platform is a bad idea as it means:

  1. Trashing all our current extensions away as afaik have compiles to other platforms but not from other platforms to haxe, only export to a language and use pre existing code (pixi-haxe only supports export to JavaScript) So we would have to forbid export to another platform than Js which would kinda beat the purpose
  2. It's a lot of work to support multiple platforms
  3. Haxe may not be much more Faster? I read that it's slow as it outputs readable instead of optimized code.

If we were to make such a big platform change/addition I would suggest rewriting GDCpp to use SDL2. It would port pretty well to pretty much any platform and be way faster

All 7 comments

It's an interesting idea, though this also means several rewrite of the game engine/renderers/extensions. But Haxe is definitely very interesting and I keep a look at it. Some extensions could be written in Haxe as a proof of concept.

Haxe has this
https://github.com/pixijs/pixi-haxe

Can also compile to js. Will it really compile to native target if it still
uses pixi

On Thu, 27 Aug 2020, 00:06 Florian Rival, notifications@github.com wrote:

It's an interesting idea, though this also means several rewrite of the
game engine/renderers/extensions. But Haxe is definitely very interesting
and I keep a look at it. Some extensions could be written in Haxe as a
proof of concept.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/4ian/GDevelop/issues/1944#issuecomment-681168524, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRRWVICDM7TXTT46QMJL6LSCWIQDANCNFSM4QLSTXKQ
.

Yeah, I wonder if Pixi-Haxe would allow for most of the existing stuff to stay functional, but potentially add on an alternative renderer and event type (Haxe event similar to JS event).

There is also the Kha framework which is used by the Armory Engine and also based on Haxe.

Its interesting, but a huge task. What will it give us apart of native
compile. Also when we say native, how involved will it be to set by our non
programmer user base? Remember we still have cocos and that is a bit
involved to set up locally and doesn't support gdevelops all features

On Thu, 27 Aug 2020, 06:35 Wend1go, notifications@github.com wrote:

There is also the Kha framework https://github.com/Kode/Kha which is
used by the Armory Engine and also based on Haxe.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/4ian/GDevelop/issues/1944#issuecomment-681545859, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRRWVM553P2SA3XVGYSNOTSCXWB7ANCNFSM4QLSTXKQ
.

Hello everyone, I'll try to make a simple Haxe exporter for proof-of-concept, it could be useful to look at the GDevelop JavaScript exporter. Can someone show me where is it in the source code?

Conveniently, 4ian wrote a blog post about it a few hours ago: https://forum.gdevelop-app.com/t/code-generation-process/27155/2?u=arthuro555

Personally I think a haxe platform is a bad idea as it means:

  1. Trashing all our current extensions away as afaik have compiles to other platforms but not from other platforms to haxe, only export to a language and use pre existing code (pixi-haxe only supports export to JavaScript) So we would have to forbid export to another platform than Js which would kinda beat the purpose
  2. It's a lot of work to support multiple platforms
  3. Haxe may not be much more Faster? I read that it's slow as it outputs readable instead of optimized code.

If we were to make such a big platform change/addition I would suggest rewriting GDCpp to use SDL2. It would port pretty well to pretty much any platform and be way faster

Was this page helpful?
0 / 5 - 0 ratings