Search the Community
Showing results for tags 'quad'.
Found 2 results
Quad like object in Phaser 2?I used to use quad objects in Starling framework where you could move vertices of a quad rectangle and set their colors and alphas. I searched for the same functionality in Phaser but apparently it's available in Phaser 3: https://phaser.io/phaser3/api/quad Can anything like that be done using Phaser 2?
How to use QuadTree?So my game has a large game world, with lots of baddies running around that I need to test for collisions with the player, as well as a tilemap with some solid (collidable) tiles. I understand that using the quadtree technique can help me sort out what is close enough to be considered for collision testing and can save me some collision checks if used right. I have read the docs and the links to the original implementations that the Phaser one is based on, and understand how the concept works, but I can't seem to find any complete explanation of how to get it working in Phaser and any special quirks that Phaser adds. The quadtree example on the Phaser examples page is not helpful. It just throws code at me without explanation. From the scraps of info that I have found from a forum search, I have the following questions: How does the grouping mechanism relate to how quadtrees work? Do the physics systems use a quadtree by default? Do I need to create my own? Are tilemap tiles considered? i.e. I might have some tiles with collides set to true. Will the quadtree factor out distant collision tiles like it would with other physics bodies when checking collisions?