Been working on and off, very slowly, on a game engine that should do most of the things I want an engine to do. One of the tips I've heard and can definitely echo is to work on a game first, and engine second. Make the engine work with your game, not the other way around.
For the longest time I've been working in a relatively OOP style because that's how I learned, and that's how things made sense. But it always ended in a mess. Whenever I wanted to reuse code I had to untangle it and rewrite stuff or copy a bunch of other stuff I would never need. So i decided I'm going to try an entity component system.
And like I dunno... Over the last year my brain slowly started rewiring my thought patterns and now it makes sense to me intuitively. You don't even have to be an ECS purist to get massive benefits out of it. Even just going in an ECS direction helps a lot.
While making a game, you will still end up depending on other entities and systems and what not. Games are complex. You can't stop dependencies. But the difference is that if you do want to break off a bit of code and reuse it, it is much more obvious where to do that.
Like while developing this thing, I switched the project I'm developing it for (or maybe with?) several times. The game changed. But I was always able to drag most of the code with me into this new game idea and keep iterating on it. And I'm fairly sure this would have been a lot harder if there wasn't this very compartmentalizable idea of components and systems.
Again I'm not an ECS or die kind of person. Especially if you're working alone, it's preferable to take some shortcuts. But even if you only loosely structure your projects in this way things seem much nicer to just... I don't know... find your way around? Reuse?
Just like any paradigm, you have to apply it in a way that makes sense to you. I've taken shortcuts. It's not pure ECS either. But even so things make sense, things fit together nicely, and there's no mess that immediately makes me want to tear the whole thing down. Which is more or less the case with literally all of my other games. Which is also why I never update them. Always learning, always growing, it's a pretty nice feeling sometimes.
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Talon (talon@dragonscave.space)'s status on Friday, 15-Mar-2024 01:30:42 JST Talon