COMMUNITY

Haxe - to make things clear!

What is Haxe exactly? a multiplatform language! But you can’t create a project in haxe language, it doesn’t exist! We must choose a project language (C ++, C #, JS, OpenFL, etc.), however it seems that openfl uses the haxe language, but with its own framework which is directly inspired by AS3. I ask myself the question, is Haxe just a kind of container of languages? if i create a C # project in which language will i have to code? in C # or in Haxe? I am a old AS coder, do I have to learn Xaxe or OpenFL?

Edit:
At the time of AS3, I coded with stage3D (for video among others) today replaced by Starling, there again, I do not understand well, Starling is a Framework in itself and more in the book learning stayed for AS3 and at no point does it refer to OpenFL, the tests I did starting from an empty project ended in failure. once again, I cannot start properly. The thing that I have managed for the moment is in Openfl to draw two Sprites and display them in a simple display list with addChild () … it annoys me to have become so stupid …
Bearing it, my last job was this without stage3D: https://www.swisstransfer.com/d/991f9142-8bca-4bf0-bbb9-1712d1e8f5cc
I must not have been so stupid at the time to do that !! I am angry with myself! really and desperate. I think they destroyed my brain with their rays and their chemotherapy … shit! Sorry for my bad language…

Welcome to Haxe!

Haxe is a programming language. It compiles code written in Haxe to another language. Just like most programming languages you can do many many things with it; create utilities, draw visual stuff on screen, AI, math tools, query databases, create websites, apps, command line tools, games, enterprise applications etc. You can even create a new programming language in Haxe. Or maybe even a complete operating system or your own browser. Of course it depends on creativity / skill / invested time how far you can take it.

Haxe has the ability to compile to different languages, which make the possibilities bigger, because you’re not limited to one platform.

It looks like you want to do one of those things, but you have to explain which things you want to do, because you don’t need a framework for everything. If you want to query a database, you don’t need openFL, in that case you want to choose a target language that runs on a server maybe. If you want to create 2d games, then you might want to use openFL (or something else, like heaps.io or kha), but if you want to create 3d games, you need different things.

1 Like

Hello @mark.knol and verry thanks for your speedy reply.
If I understand correctly, haxe is a transpileur, I create a project in a language, example C # (to choose one with Garbage Collector) and I write the code in Haxe in the IDE, then if compile and the code will be transpile to the language chosen when creating the project? I saw that Openfl is also a cross platform language, with HTML in addition … isn’t that a bit of a duplicate? My goal is to make interactive animations, web pages, because I am convinced that the future is for online applications.
In any case, thank you for helping me … :rougir:

Edit:
I’m going to eat, see you later.
PS: I will continue testing with all this: D

If I understand correctly, haxe is a transpileur, I create a project in a language, example C # (to choose one with Garbage Collector) and I write the code in Haxe in the IDE, then if compile and the code will be transpile to the language chosen when creating the project?

Yes, that sounds right! If you want Haxe to compile to c# this might be a nice introduction guide for you https://haxe.org/documentation/platforms/csharp.html

Openfl is also a cross platform language

OpenFL is a framework. It developed in Haxe, so that’s the programming language you use.
If you are planning to use openFL then you might just want to check out their examples on https://www.openfl.org/

Hi Alain,
Haxe is so versatile, it is important to use terms carefully. A project in Haxe would be a collection of Haxe code assembled for a given purpose. In every project you will be compiling the code for one or more targets, like JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash.

It can be a bit difficult getting your compiling tools set up properly, so I sympathize with you there. Simplest would be a text editor and then compile using your Terminal. Later on you might want to try getting VS Code set up with its plugins for Haxe and OpenFL.

To ease your brain into Haxe it might be best to work through the manual. Or if you prefer to dive in harder you could try a simple project and deploy it to Javascript. This one in the cookbook might be a good starting point: https://code.haxe.org/category/javascript/adding-element-to-dom.html

Coming from Flash world, you will of course be attracted to OpenFL. I would recommend starting without Starling. Many of the old AS3 code examples found in Adobe’s AS3 documentation are easily translated to Haxe. The compiler gives a lot of good feedback when something needs to change.

I hope that helps a bit!

1 Like

Yes, OpenFl seems bien pour moi, proche de AS3 dison, que pour faire du web, c’est peut-être plus simple

Ah I see you just compiled to a french language. :grinning:

1 Like

Hej Alain,

“Pour faire du web” you don’t need openFL framework.
IMHO, you go to openFL when you want to have a canvas (as was the flash player) and make heavy sprite/animations/interractions.
If you want to do “du web” as a web site client/server, you don’t need openFL, you just create a server projet (i.e. php or java or …) and a client project (js) and the both gives you a website (or PWA) or even an app using NodeJS for example…

yes, I would like to do web, but graphics, then on the other hand, I am so used to AS3 that I would like to continue in a very close language, from a syntax point of view, with complete inteliscense and garbage collector (so, C and C ++ not for me) I am pretty boring. I’m going to do some testing for various targets and see if it can work for me. I think I understand what Haxe really is. To make elaborate skins, in general, I use either a SWC library or a SpriteSheet + XML. I think Starling handles this internally.
I’ll take a look at everything you tell me. Do not hesitate to load my SWF above, it is part of the applications that I am brought to make. I stopped programming for 7 years, I’m trying to start again. Thank you again, I will probably come back soon enough: D

1 Like