26
submitted 3 years ago by [M] to c/haxe@programming.dev
 
 

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!

27
submitted 3 years ago by to c/haxe@programming.dev
28
submitted 3 years ago by to c/haxe@programming.dev
29
submitted 3 years ago by to c/haxe@programming.dev
30
submitted 3 years ago* (last edited 3 years ago) by [M] to c/haxe@programming.dev
 
 

Working on a text-based game in HaxeFlixel, and I'm wondering if there's a best practice for dealing with the text itself. There's a lot of it, and it's full of newlines and quotes and such. I imagine putting it in the actual Haxe script is probably not the best way, since you'd have to use a zillion escape characters? So like maybe a Markdown file where you could tag each text block something appropriate, and then parse it from Haxe?

EDIT: I ended up just keeping all the dialogue in a simple .txt file. I wanted to make adding dialogue as accessible as possible for people with limited computer skills, basically. And it actually turns out that Haxe's string parsing will handle alllll the escaping for you, so they can pretty much use any characters they want! Except colon (:). They just have to give the dialogue a title inside colons like :this:, and I have it set up to parse the .txt into a dictionary where the titles are the keys and the dialogue is the corresponding value.

31
submitted 3 years ago by to c/haxe@programming.dev
 
 

I remember the Haxe roundups being posted on release on the subreddit. Should we do the same here?

32
 
 

Has anybody managed to get this to work, using any version of Haxe or any OS? Every one I try has various errors and won't load. 😅

If anyone has, I'd LOVE to see your yml file/etc for it!