#Good Or bad way of setting up Characters
1 messages · Page 1 of 1 (latest)
It's not too bad. Though maybe spending several days on it is too much, considering you'll probably discover some issues or things that you didn't account for when you actually start implementing.
At its core, I like this kind of approach. It allows you to solve a lot of problems before they arrive. However, I think one should be careful when to use this approach, and when to go with a more organic/flexible design approach. The component-based approach naturally leads to somewhat flexible designs, if dependencies flow in the right way.
Why flexible designs? In my experience, what the code needs to do can change a lot with time. This can be because you decide the game needs to change, but also because of performance. Or perhaps what dlich said, because of things you forgot. That being said, a weapons system usually is designed for flexibility. From a weapons variety perspective I mean, like you did.
This looks like an OOP approach, and there's nothing wrong with that. I expect it will work fine. However, if you plan to have a lot of entities using this, you may run into performance issues with this design (from 500+ or so? hard to say, this depends on how your logic is implemented).
@pseudo tapir
Another concept I think holds true: when you do not yet have a lot of experience with an engine, you don't know the engine's constraints, and it can be hard to make proper designs. Maybe what you really need is some hands-on experience. So like dlich, I think a few days is too much, and I recommend not overthinking it. Maybe prototype it!