ultraq / redhorizon

Recreating the original 2D Command & Conquer games
Apache License 2.0
6 stars 4 forks source link

Get an entity component system (ECS) going #52

Closed ultraq closed 1 year ago

ultraq commented 1 year ago

I've got a weird mix of OO and component based game objects going on, but I think I wanna go all-in on the component based side and use an ECS - it aligns very well with what I know and like from components in web development.

Inspiration (or maybe even just use it?): https://github.com/libgdx/ashley

ultraq commented 1 year ago

I've tried starting on this by converting some things, but I'm not entirely sold on it now. Groovy already has a behaviour composition system baked into the language with Traits, and it feels like I'm rewriting Traits -> ECS.

There are some parts I like, like the naming and the fact that systems are needed to update data so that behaviour can be driven. So maybe I'll keep only those bits and carry on with what I already have 🤔