Live data from Hacker News

Try Haxe

try.haxe.org

51–60 of 89 posts

Re: Try Haxe

#51

I'm torn on haxe. It has a few nice features (macros!) and has many, many targets. But on the other hand, its syntax and some of its semantics are Java/C++-inspired, whereas something closer to its ML roots would've been so much better. It might still beat Java for writing Android apps.

The syntax is curly-brace, and on a surface level closest to AS3, but the underlying design borrows a lot from Pascal in terms of minimalism(something which Nicolas has mentioned once or twice):

The types are based on JS without truthy or falsy values; comparison is required to get boolean values.

Like Coffeescript, while+iterators are used instead of C-style for loops. (no "do while" blocks either)

Case statements don't fall through.

These little changes(plus a few others) help bring in a lot of the enforced-cleanliness that you'd get with a bigger syntax change, it just "looks" curly-brace. One that I miss is :=, since I have run into the ==/= typo occasionally(it just occurs in much more limited situations). No-truthiness is particularly interesting since you only really notice it's there when you try to port C or JS code.

Re: Try Haxe

#52
post #36
post #19

Haxe sounds too good to be true. Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? I see many half-donejavascript frameworks and fully-baked lua frameworks...what do they provide that Haxe doesn't? Can anyone who has done significant Haxe work comment to some of the benefits and drawbacks? I ask as someone in search of a gaming engine whic…

I used haxe for all my games(e.g. http://cardinalquest.com/ ) for over a year now & it's working quite well. There are some annoying differences between the different targets but it's >99% the same and you can work around the differences.

Cardinal Quest looks very cool. Could you share some light from business perspective. Profits?

Thanks.

Re: Try Haxe

#53
post #46

Earlier quoted context omitted.

I think his comment could be refrased as "This language looks like Java"

Also, IMHO the fact that Haxe looks familiar to people coming from Javascript, ActionScript, or Java is a plus.

Agreed. I'd wager there are substantially more people learning JavaScript these days than PHP, not that PHP looks too foreign, relatively speaking.

Re: Try Haxe

#54
post #19

Haxe sounds too good to be true. Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? I see many half-donejavascript frameworks and fully-baked lua frameworks...what do they provide that Haxe doesn't? Can anyone who has done significant Haxe work comment to some of the benefits and drawbacks? I ask as someone in search of a gaming engine whic…

I made a soft-synthesis and MIDI playback engine in Haxe targeting Flash:

http://www.ludamix.com/apps/triad-synth/index.html

Haven't done an official port yet, but one of the NME devs did look into using it to test the SampleDataEvent API on other targets. I did get it compiling but not running, so the ports probably won't be a huge project.

I like a lot of things about Haxe. The syntax is more streamlined than traditional curly-bracers. The type system can massively help with refactoring. It's "honest" about the limitations of targets - you get the APIs pretty much exactly as they are on the target itself. The compiler is well-implemented and updated all the time. It's just a very productive environment, and although it used to have lots of maturity/ecosystem issues, increasingly those aren't a major hurdle, at least for the game space.

Re: Try Haxe

#55
post #48
post #19

Haxe sounds too good to be true. Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? I see many half-donejavascript frameworks and fully-baked lua frameworks...what do they provide that Haxe doesn't? Can anyone who has done significant Haxe work comment to some of the benefits and drawbacks? I ask as someone in search of a gaming engine whic…

> Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? Haxe isn't a game engine. It's a language that compiles into other languages.

Not entirely true, it depends on the platform.

While compiling to JavaScript obviously results in JavaScript code (which is what the browser can understand), but compiling to Flash does not compile to ActionScript 3 and then the flash assembly (the .swf file). It goes straight from HaXe to the flash assembly.

Likewise, the Java target (which is still in development) won't merely translate HaXe into Java and then compile that Java. I've seen solutions like that and it's not fast or elegant.

Re: Try Haxe

#56
post #36

Earlier quoted context omitted.

I used haxe for all my games(e.g. http://cardinalquest.com/ ) for over a year now & it's working quite well. There are some annoying differences between the different targets but it's >99% the same and you can work around the differences.

Cardinal Quest looks very cool. Could you share some light from business perspective. Profits? Thanks.

Revenue is mid 5 figure so far from desktop and flash versions, the ios & android version were just released but I'm hoping to break into 6 figures altogether across the game's total lifespan.

Re: Try Haxe

#57
post #17

You lost me at 'public static function main.'

They found me again at

  enum Cell { nil; cons(car : T, cdr : Cell); }
 
  class List {
    public static function mymap(f : A -> B, l : Cell) : Cell {
      return switch(l) {
        case nil: nil;
        case cons(x, xs): cons(f(x), mymap(f, xs));
      }
    }
  }
Some of the Java heritage does seem slightly unpleasant, but interesting features like ML-style tagged enums and structural subtyping for record types mean I'm not going to discount the whole thing just yet.

Re: Try Haxe

#58
post #19

Haxe sounds too good to be true. Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? I see many half-donejavascript frameworks and fully-baked lua frameworks...what do they provide that Haxe doesn't? Can anyone who has done significant Haxe work comment to some of the benefits and drawbacks? I ask as someone in search of a gaming engine whic…

A problem I have had with these frameworks is that they all sound great on the surface but when you start using them you run into issues or missing features that are important to you and sometimes there's nothing you can do about it.

Haxe does look great and for this particular case I wonder how Haxe NME's performance compares to the lua frameworks like Corona and Gideros for mobile development specifically.

Re: Try Haxe

#59
post #55
post #48

Earlier quoted context omitted.

> Why would anyone use any of the other game engines out there which are targeted towards the mobile world if they could use Haxe? Haxe isn't a game engine. It's a language that compiles into other languages.

Not entirely true, it depends on the platform. While compiling to JavaScript obviously results in JavaScript code (which is what the browser can understand), but compiling to Flash does not compile to ActionScript 3 and then the flash assembly (the .swf file). It goes straight from HaXe to the flash assembly. Likewise, the Java target (which is still in development) won't merely translate HaXe into Java and then comp…

Yes, but the point was that haXe is not a game engine.

Re: Try Haxe

#60
post #59
post #55

Earlier quoted context omitted.

Not entirely true, it depends on the platform. While compiling to JavaScript obviously results in JavaScript code (which is what the browser can understand), but compiling to Flash does not compile to ActionScript 3 and then the flash assembly (the .swf file). It goes straight from HaXe to the flash assembly. Likewise, the Java target (which is still in development) won't merely translate HaXe into Java and then comp…

Yes, but the point was that haXe is not a game engine .

But it has a physics engine, a canvas, etc. I'm not a game developer (yet ;-) ), so I'm curious...what defines a game engine in your mind? What is haxe lacking? Thanks.
Post reply on HN