Haxe

116 readers
1 users here now

Welcome to the (unofficial) Haxe community!

In their own words, "Haxe is an open source high-level strictly-typed programming language with a fast optimizing cross-compiler." Mostly it's been used to create a lot of really cool indie games, like these:

Honestly I'm a pretty novice programmer myself, but I'm moderating this community anyway because it needed one. If you have experience with Haxe and are willing to moderate, please let me know and I'll promote you!

A bunch of game engines are written for Haxe, including:

There's even Stencyl, a gamedev tool built on Haxe that has a GUI and requires little to no coding. Including a block-based coding interface if you're into that sort of thing.

I'll add more resources here as they occur to me or people suggest them!

founded 1 year ago
MODERATORS
1
2
3
4
5
6
7
8
3
Haxe Roundup 703 (blog.skialbainn.com)
submitted 7 months ago by mac@programming.dev to c/haxe@programming.dev
9
6
submitted 7 months ago* (last edited 7 months ago) by mac@programming.dev to c/haxe@programming.dev
10
3
submitted 8 months ago* (last edited 8 months ago) by mac@programming.dev to c/haxe@programming.dev
11
12
13
14
15
16
1
submitted 1 year ago* (last edited 1 year ago) by MxRemy@lemmy.one to c/haxe@programming.dev
 
 

Specifically this font, although I've tried a few. Specifically in HashLink.

Anyone have any tips or best practices when it comes to fonts and FlxText in general? The default font looks great, but I'm finding that just about every other font I try looks kind of terrible. Like sort of grainy, I guess? The default one looks very crisp in comparison. Also, any non-default font that I put in a FlxButton seems to be vertically way off-center, raised up too high.

17
18
19
20
21
 
 

So, the FlxG collide method knows how to tell which tiles in a tilemap are walls or not walls, but the overlap method does not. If you write a simple custom collision with the overlap method and tell it to .separate(), your sprite will collide with every tile in the map, not just the walls.

This is expected behavior, as there's a note in the FlxG documentation that says:

this takes the entire area of FlxTilemaps into account (including "empty" tiles). Use FlxTilemap#overlaps() if you don't want that.

On the other hand, the documentation for FlxTilemaps.overlaps() says:

Checks to see if some FlxObject overlaps this FlxObject object in world space. If the group has a LOT of things in it, it might be faster to use FlxG.overlaps().

In my scenario I have a lot of tilemaps and just one object to collide with them, the player. The way this is written, I'm thinking I have to call this method for EACH MAP, i.e. map1.overlaps(player), map2.overlaps(player), etc. Whereas with the FlxG method I can pass it the entire FlxGroup of maps as one parameter and the player as another parameter, which seems way better. I guess I could write a function with a loop that iterates through each map doing this one by one, and then call that in update(), but I'm getting the impression that it might be really inefficient.

What's the best approach here? Am I missing something obvious?

22
 
 

https://itch.io/jam/haxejam-2023-summer-jam

23
 
 

I'm back with another noob support question, despite me being a moderator and this being a very small community atm. As far as efficiency/optimization is concerned, what's the best approach to making a really big open world, and then how do I actually implement it?? My stack:

  • OS: Windows 10
  • IDE: VSCode
  • Game engine: Haxe Flixel
  • Pixel art: PixiEditor
  • Map making: LDtk

I know how to just make one huge level, that's easy enough, but I've heard that might be inefficient memory-wise? I tried setting up multiple levels in LDtk, and importing each level into its own FlxTilemap. But then I couldn't figure out how to get more than one tilemap to actually display? Only the first one I add shows up. Maybe the second one is loaded but just hidden underneath it, but if so, how do I tell a FlxTilemap where it should show up? They seem to default to (0,0) and I didn't any method to change that. Or maybe you can just only have one tilemap in any given scene at a time? Would it be better to use the render method of the LDtk api instead of a FlxTilemap? I heard FlxTilemap is more efficient because it batch renders everything, whereas the LDtk api renders each tile as its own sprite.

One last question. When I switched from Ogmo to LDtk, suddenly I couldn't compile to Neko anymore. I get an Uncaught exception - std@module_read erorr. I can test the game in HTML5, but it's slower, and also for some reason the browser keeps caching old versions of the game so I have to clear everything to see any changes.

Places I've looked for answers so far:

Maybe the answer is actually in these sources, but I'm too much of an amatuer to see it? Either way, I'd really appreciate some advice!

24
25
view more: next ›