Be a Supporter!
MintPaw
MintPaw
  • Member since: Jun. 11, 2006
  • Offline.
Forum Stats
Member
Level 10
Programmer
HaXe assets? Jul. 5th, 2012 @ 12:34 AM Reply

Hey, so I'm considering moving from Pure AS3 to HaXe, but what's really turned me off so far is the lack of SWC importing, that's how I get visual assets then? Do I really have to use strait images? Can I even use an SWF maybe?

Secondly, why do I have to make all the environmental vars and junk, why do I have to have VisualStudio, why can't the installer just get everything I need and set it all up for me like Flash Develop does for Flash.


If ya have something to say, PM me. I have a lot of time to spare.
Also never PM egg82.

BBS Signature
Sandremss128
Sandremss128
  • Member since: Aug. 22, 2009
  • Offline.
Forum Stats
Supporter
Level 11
Programmer
Response to HaXe assets? Jul. 5th, 2012 @ 12:45 AM Reply

At 7/5/12 12:34 AM, MintPaw wrote: Hey, so I'm considering moving from Pure AS3 to HaXe, but what's really turned me off so far is the lack of SWC importing, that's how I get visual assets then? Do I really have to use strait images? Can I even use an SWF maybe?

Secondly, why do I have to make all the environmental vars and junk, why do I have to have VisualStudio, why can't the installer just get everything I need and set it all up for me like Flash Develop does for Flash.

Haxe is more do-it-yourself, more hardcore than actionscript. As far as I recall its possible to import and embed swf files, even if you target C++(bytecode and other things won't work, nme btw).
Haxe is a gateway, you can use it to compile to various targets and, based on your needs; you should get the tools needed to finish that, whether its the android SDK or visual C++ to compile to windows.
It takes a bit of time to get used to and there will be issues but in the end it should pay off.

4urentertainment
4urentertainment
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to HaXe assets? Jul. 5th, 2012 @ 12:49 AM Reply

I've only used haXe briefly so I may be completely wrong on both accounts but I'll try to share what I know regardless.

At 7/5/12 12:34 AM, MintPaw wrote: Hey, so I'm considering moving from Pure AS3 to HaXe, but what's really turned me off so far is the lack of SWC importing, that's how I get visual assets then? Do I really have to use strait images? Can I even use an SWF maybe?

I think since haXe is really multi-platform, and not just focused on flash, they're trying to keep it like other development environments. So when making a game with haXe, develop like you would a downloadable game. Use spritesheets and/or atlases for your assets.

Also, I think haXe outputs the relevant target code. Like if you're making a game for HTML5/Javascript, then it can output that javascript, so how would you use swc's in a javascript project? Or in a C++ project?

Secondly, why do I have to make all the environmental vars and junk, why do I have to have VisualStudio, why can't the installer just get everything I need and set it all up for me like Flash Develop does for Flash.

I think that's because they don't give you the compiler and everything right away, they basically give you the source and you build it yourself, so you're basically manually installing haXe. The more you venture into C++/(Any other language really) territory you'll find that this is mostly the norm.

Contraband678
Contraband678
  • Member since: Sep. 16, 2012
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to HaXe assets? Sep. 26th, 2012 @ 12:03 AM Reply

At 7/5/12 12:34 AM, MintPaw wrote: Hey, so I'm considering moving from Pure AS3 to HaXe, but what's really turned me off so far is the lack of SWC importing, that's how I get visual assets then? Do I really have to use strait images? Can I even use an SWF maybe?

Secondly, why do I have to make all the environmental vars and junk, why do I have to have VisualStudio, why can't the installer just get everything I need and set it all up for me like Flash Develop does for Flash.

We build asset libraries with swfmill and then just link them in like so:
haxe -cp src -main Main -swf-header 800:600:60:70707 -swf-lib assets.swf -swf9 output.swf

Much faster than mxmlc, though you have to be careful because you can still get bit by the jpeg3 recompression for your alpha-channel PNGs (haven't figured out a workaround for this yet).

Halvgoeden
Halvgoeden
  • Member since: Jan. 14, 2009
  • Offline.
Forum Stats
Supporter
Level 14
Blank Slate
Response to HaXe assets? Sep. 27th, 2012 @ 04:36 PM Reply

Depending on what platform you're targeting with HaXe, .swf is not the best way to go. I've had issues on most Android devices with rendering vector graphics.

My advice is to use sprite sheets like 4urentertainment suggested. Flash CS 6 has a sprite sheet exporter, but with versions below that you'll need to feed an external program your .swf and have it compile a sprite sheet for you. We use Spriteloq, as it's XML output works with HaXe's Spritesheet library.


.