Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411281 Posts in 69324 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 11:36:47 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)All purpouse Haxe-thread
Pages: [1]
Print
Author Topic: All purpouse Haxe-thread  (Read 1371 times)
Jordgubben
Level 2
**



View Profile WWW
« on: July 21, 2015, 08:56:06 AM »

So I've started too look curiously at Haxe a tip from an AS3 thread. Haxe was not completely new to me, but last time I saw it it was still obviously someone hobby project and nothing big. But since then haxe appears to have reached the point open source critical mass (with Mozilla and Gamebryo backing OpenFL among other things). Or in other words, it looks seriously cool now.

So (just to start of this general purpose thread) what I'm wondering is:
  • Who here is using (or has art least poked around with Haxe)?
  • Is it as awesome as it looks at first glance?
  • What are the big shortcomings?
  • What are the recommended tools for building and unit testing?
  • Will it help prevent global warming?
Logged

oahda
Level 10
*****



View Profile
« Reply #1 on: July 22, 2015, 06:48:10 AM »

I haven't tried or downloaded anything, but I did read a lot of the manual and history. It does look very cool.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #2 on: July 23, 2015, 05:02:42 AM »

I've made a handful of games with Haxe. Specifically using HaxeFlixel. My overall impression is that it's easily one of my favorite ways to make games.

If you choose to use it you've picked a great time. 3 years ago setting it up was a little annoying but the haxe toolchain now is really awesome. They have a command line program called haxelib which acts a lot like nuget or a linux package manager. You just say the library you want to use and it downloads that library plus all dependancies.

Is it as awesome as it looks at first glance?

Yes

I'll put one of my favorite features here too. When you switch on enum, the compiler enforces you to explicitly handle every enum entry or it's an error. I love this. In C++ I tend to put an assert(false) in the default case to try to prevent other people from not updating a switch statement but that means it just crashes at runtime. I could probably mitigate that with a static if or something but I cant use modern c++ most of the time.

What are the big shortcomings?

Debugging has traditionally involved using the flash target and its debugger. This isn't really a problem except to use it you have to install Java. If that's not an issue for you then it's ok.

It doesn't really have any major shortcomings I can think of. If I think of anything I'll post back.

What are the recommended tools for building and unit testing?

IMO the way to go is haxelib (which is part of haxe) and FlashDevelop. FD has full haxe support and works like an aboslute dream for every target (that reminds me, I need to send them a donation).

FD I think is windows only though. Depending on whether or not you have/use windows that could be a big issue. After that I'm sure you could augment sublime text with a plugin or something like that. At that point you would have to start managing your own build scripts.

As for unit testing. I've never done it in the language because I've only ever really used it to make games on top of a library (haxeflixel) that implements anything I use that might be concievably unit-testable.

Will it help prevent global warming?

I was going to spend a lot of time writing a serious answer in a sarcastic veil but I just realized I have to do some work :D



bottom line : Haxe is one of my favorite languages and definitely recommend it. If you were doing as3 flash development I would  definitely recommend using flash instead since it has a flash target.
Logged

oahda
Level 10
*****



View Profile
« Reply #3 on: July 23, 2015, 05:25:11 AM »

I'll put one of my favorite features here too. When you switch on enum, the compiler enforces you to explicitly handle every enum entry or it's an error. I love this. In C++ I tend to put an assert(false) in the default case to try to prevent other people from not updating a switch statement but that means it just crashes at runtime. I could probably mitigate that with a static if or something but I cant use modern c++ most of the time.
I don't know if both are needed or just the latter, but I compile my C++ code with -Wall and -Werror and it does stop me when a switch doesn't handle every value.
Logged

Jordgubben
Level 2
**



View Profile WWW
« Reply #4 on: July 23, 2015, 08:42:40 AM »

What are the recommended tools for building and unit testing?

IMO the way to go is haxelib (which is part of haxe) and FlashDevelop. FD has full haxe support and works like an aboslute dream for every target (that reminds me, I need to send them a donation).

FD I think is windows only though. Depending on whether or not you have/use windows that could be a big issue. After that I'm sure you could augment sublime text with a plugin or something like that. At that point you would have to start managing your own build scripts.

As for unit testing. I've never done it in the language because I've only ever really used it to make games on top of a library (haxeflixel) that implements anything I use that might be concievably unit-testable.

I should probably have phrased that question differently. When I wrote "tools for building" I really meant tools for building. I'm the Terminal + Sublime type of developer Ninja, so managing my own build scripts is usually my way to roll. What I'm looking for is the equivalent of make, grunt or gradle.

For unit testing I've been looking at MassiveUnit. This is what openfl and flixel are using. But I prefare bdd-style frameworks like mocha.js.
 


Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5 on: July 23, 2015, 01:22:15 PM »

I'll put one of my favorite features here too. When you switch on enum, the compiler enforces you to explicitly handle every enum entry or it's an error. I love this. In C++ I tend to put an assert(false) in the default case to try to prevent other people from not updating a switch statement but that means it just crashes at runtime. I could probably mitigate that with a static if or something but I cant use modern c++ most of the time.
I don't know if both are needed or just the latter, but I compile my C++ code with -Wall and -Werror and it does stop me when a switch doesn't handle every value.

More often than not I don't have control over the compiler flags Sad

What are the recommended tools for building and unit testing?

IMO the way to go is haxelib (which is part of haxe) and FlashDevelop. FD has full haxe support and works like an aboslute dream for every target (that reminds me, I need to send them a donation).

FD I think is windows only though. Depending on whether or not you have/use windows that could be a big issue. After that I'm sure you could augment sublime text with a plugin or something like that. At that point you would have to start managing your own build scripts.

As for unit testing. I've never done it in the language because I've only ever really used it to make games on top of a library (haxeflixel) that implements anything I use that might be concievably unit-testable.

I should probably have phrased that question differently. When I wrote "tools for building" I really meant tools for building. I'm the Terminal + Sublime type of developer Ninja, so managing my own build scripts is usually my way to roll. What I'm looking for is the equivalent of make, grunt or gradle.

For unit testing I've been looking at MassiveUnit. This is what openfl and flixel are using. But I prefare bdd-style frameworks like mocha.js.
 

When I use Haxe I explicity use the IDE route because my day job involves writing build systems and I just want to make games.

I not totally sure but I think it might work a bit like jam where it can just look for build targets according to file system structure rules. Each haxe project uses an xml file to define a lot of stuff you would do in make or jam but IIRC it doesn't specify code files explicitly like you would in make. I'm at work right now so I can't confirm though.

As for grunt and gradle I'm not familiar. The gradle website seems to talk about CI and kind of looks like Teamcity or Jenkins. There's definitely nothing like that built into haxe.
« Last Edit: July 23, 2015, 01:28:23 PM by InfiniteStateMachine » Logged

Jordgubben
Level 2
**



View Profile WWW
« Reply #6 on: July 25, 2015, 04:37:22 AM »

Apparently there is an initiative to port  lime/OpenFL to consoles. This would make it possible to compile the same game code base to everything from web/flash to ps4/3DS.

Not even Unity/Unreal has that range.  My Word!
Logged

Photon
Level 4
****


View Profile
« Reply #7 on: July 25, 2015, 06:00:27 AM »

Apparently there is an initiative to port  lime/OpenFL to consoles.
Yeah, if they pull this off I could imagine its going to be pretty sick.

Anyway, being someone who started out more or less with Python and Pygame (yes, I was one of those people,) I wanted something no-nonsense that I could code and deploy in but that was more powerful. I already code for a career, so for my gaming stuff I didn't want to deal with cryptic errors and rabbit holes just to get a window with a single sprite up and running. Haxe with OpenFL and the FlashDevelop IDE do that for me very well.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #8 on: July 25, 2015, 02:59:52 PM »

Apparently there is an initiative to port  lime/OpenFL to consoles. This would make it possible to compile the same game code base to everything from web/flash to ps4/3DS.

Not even Unity/Unreal has that range.  My Word!

If my memory serves correct Lars from haxeflixel posted here a while back saying vita was done too.
Logged

Jordgubben
Level 2
**



View Profile WWW
« Reply #9 on: August 04, 2015, 02:42:45 AM »

Unfortunately getting started with lime/OpenFl has proven to be a bit of a disappointment as I can not manage to get the lime tools to install. It is most like related to my set-up (possibly because I'm installing with Homebrew). However when debugging I quickly started reading through the source and it did not take me long to find stuff like the following.

Code:
var variable = null;

try {
  variable = methodThatCouldFail();
} catch (e:Dynamic) {}

variable.someStuff();

(Stuff like this is no problem when everything works, but it makes it very hard to figure out what's going wrong.)

I should add though that the dev's have been very helpful so far in trying to help me figure out what's wrong with my install.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic