There is no built-in single way to setup collisions in kaboom, so I am hesitant to actually implement a ready-made sort of thing for this, but I could see a helper like getStaticBodies(map) being useful.
Tiled also has a nice "physics editor" that is per-tile (but sub-tile arbitrary shape) which is extremely useful for setting up the collision-shape of, for example, a coastline, so whenever you draw a coast between sand & water (like with a terrain-brush) it uses them. kaboom doesn't seem to do collisions with this much granularity, but it definitely seems worth exploring making a helper to make using these easier. I could even see it being a separate kaboom plugin.
An initial idea might be a per-tile collision setup, where you add a collision=true property, then add a helper that can turn this into a bunch of kaboom collisions. This would make it simple to make non-granular collisions for simple games, and could be expanded later.
There is no built-in single way to setup collisions in kaboom, so I am hesitant to actually implement a ready-made sort of thing for this, but I could see a helper like
getStaticBodies(map)
being useful.Tiled also has a nice "physics editor" that is per-tile (but sub-tile arbitrary shape) which is extremely useful for setting up the collision-shape of, for example, a coastline, so whenever you draw a coast between sand & water (like with a terrain-brush) it uses them. kaboom doesn't seem to do collisions with this much granularity, but it definitely seems worth exploring making a helper to make using these easier. I could even see it being a separate kaboom plugin.
An initial idea might be a per-tile collision setup, where you add a
collision=true
property, then add a helper that can turn this into a bunch of kaboom collisions. This would make it simple to make non-granular collisions for simple games, and could be expanded later.Relates to #1