Skip to main content
6 events
when toggle format what by license comment
Apr 11, 2022 at 14:57 vote accept Nick Román
Mar 27, 2022 at 5:42 comment added Brett @NickRomán I use a hybridized ECS/Inheritance model because I'm yet to build anything that is complex enough to require "full ECS". In the project I'm working on currently (Direct2D, .NET), a vertically scrolling shooter, the map and the ability to edit it is completely componentized to maximize flexibility, while the sprites and animations use a couple of levels of inheritance. The approach you described in your last comment sounds like a good way to go, with an ECS already in play.
Mar 27, 2022 at 5:26 comment added Brett You're welcome, I'm pleased to contribute. I think you've made the right choice by selecting tile-based mapping. Although it's not always the optimal solution, I use it in 95% of 2D games I cobble together because it's very flexible and when done correctly, it's tile-based nature is indistinguishable. If I may ask -- have you decided on a tile size yet and are you planning on supporting multiple resolutions? I ask because in the case of the latter, scaling things appropriately. can be a challenge.
Mar 25, 2022 at 14:04 comment added Nick Román On that note, what I also found very useful is separating the 'static' tiles, which do not have any properties attached to them (i.e., they are only rendered), from 'Special' tiles that have animations, collision boxes, etc. Then I can create dedicated structs / entities for those and process the logic via the ECS so I don't have to e.g. create separate collision systems for tiles vs other entities. Is that similar to what you've implemented in your game?
Mar 25, 2022 at 13:55 comment added Nick Román Thanks for the detailed answer! A few days have passed and, eventually, I also decided that using Tile-based maps might be the best way to manage resources. What I did is, outside of the ECS I've designed, I've written a dedicated Parser that takes Tiled XML maps and tilesets and renders those separately. As for why I'm using Tiled and not a dedicated Map Editor in the engine as you suggest, which I think is way cooler: I have someone else on my team, who doesn't know how to code, designing all the maps and assets, so having a pre-designed tool with a simple interface they can use is ideal.
Mar 23, 2022 at 23:24 history answered Brett CC BY-SA 4.0