hi all,
I’m developing a basically simple game in phaser, but when trying to find a working setup, I feel like getting lost in multiple setups and I’m not finding something satisfying.
Would be great if someone can help here.
Here is my idea:
- the game is played on a static background image
- there are different images/sprites moving over the background image
- I want to detect collisions between the sprites and certain areas of the background image
- not all sprites collide with the same areas
- the areas of the background image where collisions happen can have any shape, I would like the collisions to be as precise as possible
- for some collisions I want to get a callback executed while others should collide according to the physics configured
I have tried quite a few things:
- arcarde and matter physics → from my understanding, only matter physics can work with tilemap based collisions which I assume I need to get precise enough collisions
- created tilemaps with Tiled and added multiple layers so different object can collide with different layers… spent a lot of time setting matter collision categories, but did not get it to work
- adding a tileset image for the background (2000x1600 pixels) and also for some smaller images makes the game incredibly slow, so I added a separate image that is independent from the tileset… but that’s tricky as some of the images where I need this are moving and are part of the physics, so I need to constantly keep the image in sync
Are my ideas so unusual? I’m very grateful for anyone who have advice or examples of similar setups.
thanks!