Posts Tagged HaXe

haXe, NME, RobotHaxe, Git, GitHub, brains exploded

Hell yeah! Crazy day. Spent all day figuring stuff out, now I’m pretty tired but I have to share my findings.

NME, a cross-platform solution

So, I am looking for a true cross platform development solution that will give me output for iOs, Android and Web (Flash). Using Flash and Air is too slow for me, but I do like ActionScript 3 a lot so NME seems like the logical solution. What is exactly NME? You know what? I don’t really know. It uses haXe and I think haXe is a programming language based on ActionScript. NME can compile both to Flash and C++ (and many more). That is as much as I could figure out, but I’ll keep digging.

Installing haXe and NME seemed pretty straight forward and it seemed to have worked, the only trouble I had was with FlashDevelop. Syntax high lighting is all off and it doesn’t seem to find where the classes are. But it compiles so I could at least get some stuff done.

From ActionScript to haXe

Actually that part isn’t that bad, there are little differences which you can find on this cheat sheet, but there are also concepts that are totally oblivious to me like the Dynamic type. But I just rolled with it and everything kept working, so this is something I’ll figure out later too. Little annoying thing every class needs a constructor (but at least the function name is only “new”) and if you extends something, you have to call super. Also, I noticed that on the NME Sprite (nme.display.Sprite), there is no rotationY property (well this is particular to NME, and I have never used rotationY before until 2 days ago, so I find this very funny).

On to RobotHaxe

Well I can’t really do anything without Robotlegs. I like how simple things are with it and well organized, so if I was going to move to another language, it needed to have Robotlegs. Period. Well I also need to be able to embed Fonts, have a Tweening engine and something to replace timeline animations, Robotlegs is the most important. Turns out there is a port to haXe called RobotHaxe made by David Peek. The only problem, there is no documentation, no examples, no tutorials… I decided to give it a shot anyway, how hard could it be? Kinda hard… haha. Anyway I got it to work, not sure it is the best way to do it, but it works (for what I have tested). I made this test RobotHaxe project using FlashDevelop and NME, not sure what it implies but I think it can be useful to people so I am giving it to you.

Git and GitHub

I never used Git before, always used SVN so that was new territory also. I also used to make a zip file and give my sources like that, but I figure GitHub is a better solution since you can browse before downloading. Anyway I put my test project on it. So go check it out here : Example RobotHaxe Project for NME and give me feedback or tell me how I could do it better, because I really don’t think it is perfect. But it is better than any other example out there. ( I know there is a bunch of guys using RobotHaxe for JavaScript, but the code I have seen from them wouldn’t work in Flash so it wasn’t really helpful)

, , , , , , , , ,

10 Comments


Happy 2012!

4 years I have been writing on this blog. I am kinda proud, but I do have to ramp up the pace.  It’s been 4 months since I left B-Reel and let’s say that I have been semi-productive. I have not been doing nothing but I have not worked 7 hours everyday, not even 5 like I wanted. Kinda hard to wake up early when you are your own boss. Also, I only wrote 4 posts in 4 months so the traffic to the site diminished a bit but nothing too serious.

So here we go for 2012, I am about to finish a personal game and a contracted game, so that is good. I have another game that is about 45% completed, so I will be working on that next. My goal is to complete 3 personal games this year, not including the one that is almost finished. Don’t know if I’ll be able to make it, but it sure would be good. I would also like to post 2 times a month, to be realistic, more would be better but I am not sure I will have the material to write as much. I will probably also try to look into HaXe, I am very curious about this tech, what it can do and how to use it so we will see.

So happy 2012 for everyone!

,

No Comments



Parse error: syntax error, unexpected ';' in /homepages/25/d169645162/htdocs/wp-content/themes/fusion/footer.php on line 13