PDA

View Full Version : HaXe in the real world?


maskedMan
06-07-2010, 03:25 AM
Can anyone here point to sites or applications that HaXe has been used to create or deploy in the real world, outside of tutorials? I'm really curious to know whether it's been helpful or not, and in what capacity. Particularly I'm curious whether it's useful *apart* from the ability to compile a swf.

Can anyone who, for example, doesn't know PHP point to an instance where the wrote the PHP code for a site using only HaXe? What about C++?

wvxvw
06-07-2010, 08:11 AM
Well, I'm not a pro in PHP - will my example count? :)

Here's HaXe own showcase: http://haxe.org/com/projects
I can add on top of that:
http://www.scarygirl.com/ uses HaXe (it's not fully HaXe though).
Of course Motion-Tween has some showcase: http://www.motion-twin.com/english .
http://tankionline.com/en/ - they use some HaXe (just like Scarygirl, it's not fully HaXe, it's more AS3, and just a bit of HaXe in performance-critical places).
http://game.destiny-online.ru/ - (I don't think they have English version) they use very little of HaXe, although, I know for sure they do :) Again, performance-critical places.

I'm using HaXe port of SWFMill (http://code.google.com/p/hxswfml/) - and SamHaXe (http://www.mindless-labs.com/trac/samhaxe/), the C++ versions; it's possible to use Neko version of them both.

Regarding PHP, I don't think it is a good idea to use HaXe PHP target alone because HaXe doesn't deal with the PHP side of it being basically a language for HTML templates. Eg. there's no way to translate this kind of PHP code to HaXe:
<ol>
<?php for ($i = 0; $i < 100; $i++) { ?>
<li><?php print $i; }?>
</ol>
Also it doesn't have analogues for all the PHP features, like heredoc strings and so on. Which, on the other hand may not be such a bad thing as it brings some more "standartization" to the code.

maskedMan
06-10-2010, 05:19 PM
Thanks for the links and for the information!

So, I'm trying to figure out whether using it truly allows you to port the same codebase from one environment to another, but it seems like there are too many instances where you're forced to import a specific Lib, thus causing the compile to fail in other environments.

Can you *really* use it to make a fully featured application that is platform agnostic, and all you really need to do is just switch the target platform?" Could you compile a .swf, a .js, and a Neko / CPP project with full graphical and user interactivity, without rewriting your codebase, or specifically targeting any of them?

Right now I'm just not seeing how it's done. Can it be? What am I missing?

maskedMan
06-10-2010, 09:37 PM
To answer my own question, I just discovered the neash and NME libraries. So this looks kind of interesting.

maskedMan
06-12-2010, 12:00 AM
So I like the potential here, but it seems like it's just not quite there yet. I'm not sure it *can* ever be. How thin can you stretch this abstraction layer before you lose out on so much target functionality that it's no longer workable?

Also, on the one hand you have an inventive agglomeration of people who are doing their best to push things forward for themselves in their own ways, and a few who are dreaming really big (and I really like the effort!) and trying to tie loose ends together into something grand, but it lacks the kind of formal "push" that it needs to get some of these issues sorted out.

It also seems like just the act of getting set up can be a challenge in its own ways

1. A zip packager that sets off virus scanners? Really? Can they not do something about that?

2. Scant documentation aside from the mailing list. The people there are really helpful, but it's not a set of instructions you can just pop open

3. So little on Google for all the strange errors that crop up

4. You want to use X library you found on haxelib (assuming you figured out how to set up haxelib!) and you install it. You find out that the library doesn't work and you go to debug the lib. You find that it references a package that doesn't come with it!? So you go looking in haxelib for the package or project that your library is dependent on, but it isn't there. You don't have any clue where to find it either. Remember, google won't help you much.


The dev community really would benefit from some better organization, but the culture seems to be one that wouldn't adopt or embrace it.

I'll keep playing with haXe, and I'll still be watching. Probably posting my noob issues to the mailing list for a while as well. :)

wvxvw
06-17-2010, 11:14 PM
Well, the documentation is an issue... JLM does his best to improve the situation, but, funny enough, writing the comprehensive documentation may some times take much more time then making the actual working code... Well, it kind of reminds me of a days when I, a third grade student bought a do-it-yourself camera constructor... I've spent more time trying to put it together then actually making photographs... Though it was a very fun time :)
I think that people used to Linux are more used to that things don't usually work as expected at first and you have to put some extra effort to find / compile / fix the programs you use... and such is HaXe. It isn't ready for being used in conveyor-like development, where you send a complete novice to the 2-months course, give him documentation and you get a programmer... You ought to have knowledge in other fields to use it at a normal level. But there is a lot of innovation, and even in certain cases it will offer much better solution then what you can possibly achieve with AS3.

maskedMan
06-18-2010, 04:34 AM
I would agree on all those counts. I think that if I had encountered haXe four or five years ago I probably would not have been able to work with it at all, but it's kind of a fun puzzle now.

I'm constantly amazed by the lightning speed of the haXe compiler. I've considered porting one of my pet projects to haXe just for a test drive, but most of them rely in some fashion on the IDE. Would you really get the supposed runtime speed benefits if you *only* compile the code with the haXe compiler, but use a Flash generated asset swf?

I truly wonder how long some of my larger Flash IDE projects would take if it were possible to use the haXe compiler to compile a .fla.

wvxvw
06-18-2010, 08:17 AM
Well, the technique for using vector assets in HaXe is like so:
- (difficult) use SVG designed in another editor, like, say, Inkscape. Then transcode it using SWFMill. The problem is that there isn't always a one to one translation between SVG and SWF. There's no way that I know of to create multiple frames SWFs in such way, unless you compile that in a very complex way, like, say, first SWFMill, then HXswfML, and then again use -swf-lib in HaXe.
- just use the Flash IDE and use the SWF / SWC it produces.
The problems are obviously in that -swf-lib functionality isn't as robust as Flex when working with other libraries. AFAIK in HaXe 2.06 this was addressed, but I'm yet to try the new things... So far using third party code / assets was quite a bit of work...

This is also why HaXe people are asking Adobe to allow HaXe to be integrated with the Flash IDE... http://ideas.adobe.com/ct/ct_a_view_idea.bix?c=975F47A1-B925-4456-89DB-3BEFB1DA7780&idea_id=D62AC800-1BD6-4C79-85A7-6CCCE1C403AC
Also it sounds quite lame... and it doesn't look like Adobe are / will consider HaXe seriously... they are a bit on their high horse when discussing such things...

JLM
07-02-2010, 12:11 AM
Can anyone here point to sites or applications that HaXe has been used to create or deploy in the real world, outside of tutorials?

haXe people's projects (http://haxe.org/com/projects)


Would you really get the supposed runtime speed benefits if you *only* compile the code with the haXe compiler, but use a Flash generated asset swf?

Well if you load the asset movie at runtime into the same domain then you can compile the fla separately from the haXe code, so it should be faster since you don't have to compile both at the same time, I describe my approach here...
compositeflashgraphicswithhaxe (http://haxe.org/doc/flash/compositeflashgraphicswithhaxe)
I would like a tool to go into the fla compiled swf and some how allow the compiler to check asset are available, but creating textfields in flashIDE is a pain so I am more and more thinking I need to develop a tool to create layouts.

anx
02-03-2012, 06:40 PM
Alan(From FDT) spoke at FlashTent about a month ago on a overview getting started with HaXe (http://02geek.com/courses/video/51/406/haXe+Overview.html) and i've asked him the exact question your asking. worth watching. great session.
http://02geek.com/courses/video/51/406/haXe+Overview.html

zarmeda
10-10-2013, 04:48 AM
- just use the Flash IDE and use the SWF / SWC it produces.

zarmeda
11-08-2013, 11:29 AM
good thanks a lot :D:D:D