Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411804 Posts in 69416 Topics- by 58462 Members - Latest Member: Moko1910

May 28, 2024, 09:07:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsIs there interest in some haxe/NME tutorials/faqs/guides?
Pages: [1]
Print
Author Topic: Is there interest in some haxe/NME tutorials/faqs/guides?  (Read 3942 times)
ishlilith
Level 0
**


View Profile WWW
« on: October 01, 2012, 01:16:57 PM »

I'm asking because I wrote a couple of blog posts about the difficulties I found while making a game for flash and android (Thread in announcements) but lost the hard drive before I could upload it to my server.

So instead of forgetting about it I'm asking if someone would be interested on some tutorial, or help avoiding common problems (or at least problems I ran into) like extensions, manifests, rendering, etc...
Logged

GalaethGames
Level 2
**



View Profile WWW
« Reply #1 on: October 02, 2012, 07:28:25 AM »

Definitely!
I'm considering using haxe & nme, but I haven't pushed myself due to the lack of good proper tutorials, such as creating small 2D games,  setting up a project manually (I use linux so can't use flashdevelop).
Logged

Moczan
Guest
« Reply #2 on: October 02, 2012, 02:16:28 PM »

Definitely!
I'm considering using haxe & nme, but I haven't pushed myself due to the lack of good proper tutorials, such as creating small 2D games,  setting up a project manually (I use linux so can't use flashdevelop).
And complete lack of documentation, cross-platform API changes not to be found anywhere etc.
Logged
Randomasta
Level 1
*


wait, what?


View Profile
« Reply #3 on: October 03, 2012, 05:21:49 AM »

Yes please!
One question though. Would you recommend NME for a serious project? From what I see, it doesn't look very stable, with bugs here and there.
Logged
Richard Kain
Level 10
*****



View Profile WWW
« Reply #4 on: October 03, 2012, 08:59:08 AM »

One question though. Would you recommend NME for a serious project? From what I see, it doesn't look very stable, with bugs here and there.

Well, the need for Haxe + NME has decreased somewhat since AIR started getting its act together. Once upon a time NME was the de-facto way for developing for Flash and portable platforms simultaneously. The upgrade in AIR support has made a new path for flash developers to get their projects on iOS and Android.

For me, the biggest problem with NME was the fact that features were not consistent across platforms. While most of the C++ targets supported advanced rendering support, the Flash target didn't. Having to restructure your entire rendering system to support Flash just wasn't feasible. I also ran across some problems caused by the use of SDL for audio. A bit more consistency between the features for the targets would have helped me considerably.

I think there are still plenty of reasons to use NME. Haxe is a decent language, offering several features that can help to streamline coding. It also has a surprisingly capable compiler for exporting Flash files. It's actually faster and more efficient than Adobe's. NME also provides certain rendering features still not available in AIR. By using it properly you can get better performance than would be possible with the more traditional pipeline.

I would recommend it for a serious project, but only if you are certain of which targets you are going for. Also, I would avoid using any of the "latest" features. Relying on the older, more stable features of Haxe + NME will help you to avoid problems from bugs.
Logged
Moczan
Guest
« Reply #5 on: October 03, 2012, 12:50:25 PM »

Actually in the standard "draw as many bunny sprites on the screen" benchmark AIR wins, it's just that haXe compiles to faster code than AS3 and is seen as a better language overall. But in terms of reliability AIR beats it hands down and that can be an important factor when making a serious project.
Logged
Richard Kain
Level 10
*****



View Profile WWW
« Reply #6 on: October 03, 2012, 01:21:54 PM »

Actually in the standard "draw as many bunny sprites on the screen" benchmark AIR wins, it's just that haXe compiles to faster code than AS3 and is seen as a better language overall.

Is that benchmark the same when using NME's drawTriangle functionality?
Logged
Randomasta
Level 1
*


wait, what?


View Profile
« Reply #7 on: October 04, 2012, 01:37:47 AM »

I would recommend it for a serious project, but only if you are certain of which targets you are going for. Also, I would avoid using any of the "latest" features. Relying on the older, more stable features of Haxe + NME will help you to avoid problems from bugs.
Thank you for the insight. Do you mean that it would be best to use only one target, for example C++? I'm fine with not being able to target Flash, so it's not much of a treouble for me actually.
Logged
Moczan
Guest
« Reply #8 on: October 04, 2012, 02:26:48 AM »

Actually in the standard "draw as many bunny sprites on the screen" benchmark AIR wins, it's just that haXe compiles to faster code than AS3 and is seen as a better language overall.

Is that benchmark the same when using NME's drawTriangle functionality?
Yes, same for both drawTriangles and drawTiles, they are faster than display list, but AIR with Stage3D can do a bit better (it's in a 10% range, so not a colossal difference).

I would recommend it for a serious project, but only if you are certain of which targets you are going for. Also, I would avoid using any of the "latest" features. Relying on the older, more stable features of Haxe + NME will help you to avoid problems from bugs.
Thank you for the insight. Do you mean that it would be best to use only one target, for example C++? I'm fine with not being able to target Flash, so it's not much of a treouble for me actually.

Yes, if you want to only target one platform you are pretty much safe. The most important thing is not to update your NME during development, they've once broke whole gpu rendering in c++ windows target and it didn't get patch for like 2-3 month.
Logged
ishlilith
Level 0
**


View Profile WWW
« Reply #9 on: October 04, 2012, 05:13:50 PM »

OK, I had a bit of free time this afternoon and made a quick prototype of a match 3 game.
The code is a mess, but it shows that it's perfectly possible to code for flash, windows and android with very few changes. It also uses native extensions for flash and Android to show ads (mochimedia and admob) and play music (hxmikmod and Andmodplug), not on the preview version though.

It also shows how it differs from platform to platform (Text is the main culprit here), conditional compilation, overriding of manifests, java extensions, lots of bugs, etc..

I will try to write something this weekend, meanwhile you can play the flash version on newgrounds

The windows version is here

And the android version is here

And this is the HTML5 version, it is playable and compiles fine after changing just one line of code, but I don't think it's ready for serious productions. Execute in localhost, or upload to a webserver.

Yes, same for both drawTriangles and drawTiles, they are faster than display list, but AIR with Stage3D can do a bit better (it's in a 10% range, so not a colossal difference).


Are you sure? All the benchmarks I've seen (one here) fall heavily in NME's favour. Has AIR improved that much recently?
Logged

Moczan
Guest
« Reply #10 on: October 05, 2012, 02:31:17 AM »

Yep, also, ND2D and Starling, while being feature-rich and really pleasant to work with, aren't exactly pushing the limits in performance department. Benchmarks aside, the drawTriangles and drawTiles where the main culprit of my porting headache with haXe few month ago. A simple prototype with sprite running around parallax scrolling background totally broke when I've tried to make a Flash version. Having to write a 2 separate rendering routines is a pain in ass.
Logged
Arnold
Level 1
*



View Profile WWW
« Reply #11 on: October 16, 2012, 09:19:53 AM »

Since the upcoming version of stencyl.com will use haxe as the base engine, specially a tutorial on extensions in haxe would be super cool!
Logged

I'm 1/2 of @Tinytouchtales and I collect Video-Game stuff on @Speicherstand
tjkopena
Level 0
**


Fortune favors the bold.


View Profile WWW
« Reply #12 on: October 17, 2012, 05:45:08 PM »

I recently put together a simple but pretty reasonable game in Haxe/NME.

The one real problem I've had is that the sound support is not very uniform across platforms.  It pretty much works as expected in Flash.  In native Linux there are a couple gotchas.  In Android it currently requires a lot of manual workarounds.  I'm still working on resolving these sound issues to finish the port to Android.

Overall though I really love it and recommend the combo.  I probably wouldn't bet a huge budget production on it, but for personal or small projects I think it's more than mature enough.

For what it's worth, all of the core engine I developed for that game is available as open source.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic