Last time, I talked about how I was switching game engines to Heaps, from Flixel and OpenFL. I also decided to start using the ECS coding style/paradigm. I'm enjoying it! Who knew you could have fun while coding?
Heaps is really two different game engines: a poorly documented engine that has everything you need, or a poorly documented engine with almost nothing you need but a ton of examples. I think that second option is better, because Flixel is a far better "everything you need" engine.
For instance, there is a default animation class, but I don't find it all that nice to use in a game. Interfacing with it is awkward, and it updates automatically instead of when I want it to. However, it does show you how to draw changing things onto the screen. I can write my own animation code just fine, but I would have no clue how to do lower-level drawing without some good documentation and examples. The docs aren't that good, so we have to take whatever examples we can get. There is a lot of (snarky) help in the Haxe Discord, for better or worse, so I try to take notes when discussions go down.
Some people have mentioned wanting to learn about or try Heaps, so I recommend it only if you're not afraid of going into the source code to figure out how something works, and then rewriting it yourself because it was implemented weirdly. Or having breaking changes pushed to dev because Shiro Games codes differently than you.
Heaps gives me just enough so that I'm not talking directly to your graphics card, but not so much that it would be awful and silly to rewrite parts to be how I want them to be.
Entity component systems (ECS) are a way of organizing your code. It's a bit fussy, but it scales well. Like, a project I'm working on could easily have local multiplayer added, and I'm not even trying to make it happen. Typically, it's a pain in the ass since you tend to code assuming there's only every going to be one player, or you start off knowing there are going to be multiple. Everything is broken up so much that adding a new player is barely any additional code, mostly just saying which controller or keys to use for input.
ECS libraries split up code into data (components), data holders (entities), and operations on that data (systems). It makes sense on paper, but I tried 5 or 6 different libraries (and started to write my own) but never really liked it. I ended up loving "Aidan's ECS" as we call it, which uses a significant amount of black magic to streamline the coding process. It's starting to feel like I'm making a bit of a library on top of it, which is a nice feeling knowing I'll be able to easily reuse code.
I said that it's a bit fussy, and I'm going to see just how fussy in a Haxe game jam coming up. ECS make it hard to write the kind of spaghetti code that brings a game jam game together in a short time, so we'll see what happens. I haven't finished a game using an ECS library yet, so I'm going to need to keep my scope small.
But yeah, it's so easy to modify code and add new features because of how ECS is organized and split up. And I'm not fighting the game engine all the time because there's almost nothing there to fight against. I'm really enjoying it so far.
ORHX
F*ck it, i program in machine languaje
MSGhero
You're either dumb as hell or a god. Maybe both. (I'm kidding)