icetimux Posted January 18, 2017 Share Posted January 18, 2017 I remember I tried this plugin a few days ago. Does it works now if I use a tilemap with 16px x 16px little tiles? I remember it used to only work with the 32px phaser sample. Link to comment Share on other sites More sharing options...
hexus Posted January 28, 2017 Author Share Posted January 28, 2017 On 1/18/2017 at 10:03 PM, icetimux said: I remember I tried this plugin a few days ago. Does it works now if I use a tilemap with 16px x 16px little tiles? I remember it used to only work with the 32px phaser sample. The plugin shouldn't be constrained to tiles of any specific size, it will use whatever width and height each tile has set, which will come from your map data. Link to comment Share on other sites More sharing options...
hexus Posted February 11, 2017 Author Share Posted February 11, 2017 Hello everyone! I've recently released v0.2.0-beta for you all to check out. It comes with several new features: Premade tilesets Built in tileset slope mappings for Ninja Physics and Arcade Slopes tilesets Debug rendering for tile polygons (tilemapLayer.debug = true) Offset tilemap layer support (though this has always been janky in Phaser) Circular physics body support Tile collision flag support Grab a copy here. Check out the demo! The demo has been updated with Phaser CE 2.7.3 and Arcade Slopes v0.2.0-beta. It lets you change the player's shape & size and witness the debug rendering. jpdev and askariwa 2 Link to comment Share on other sites More sharing options...
hexus Posted May 29, 2017 Author Share Posted May 29, 2017 Thought I might as well update this thread with the changes between v0.2.0-beta and v0.2.0. v0.3.0 is now in the works! Quote v0.2.0-beta2 - 7th June 2017 Implemented unintrusive support for an experimental Phaser CE fork. Added sprite scale support for AABB physics bodies. Included a reference to the plugin with the facade. This makes it easier to remove the plugin at runtime (this.game.plugins.remove(this.game.slopes.plugin)). Fixed multiple calls to slopes.body.enable(sprite) causing an error. Ensured that tilemap debug rendering only wraps if the layer has its wrap property set to true. Fixed wasTouching flags (#35). Added the last collided tile to body.slopes.tile. Fixed a heuristics mistake that's been around since May 2016 (4ee0d23)! There are probably more... Fixed a wrapping issue with tilemap layer debug rendering. Added dynamic heuristics and preferY properties to the Facade, making it simpler to toggle these features globally (game.slopes.heuristics,game.slopes.preferY). Fixed SatSolver.collide() setting collision response properties on physics bodies before knowing whether the separation was successful. Fixed SatSolver.collideOnAxis() not setting collision response properties on physics bodies. Improved memory consumption by reusing SAT response objects for each body. v0.2.0 - 18th June 2017 Added heuristics for square tiles to improve skipped collisions (#38) at the expense of some inconsistencies when bodies exit tiles from inside. Allowed physics bodies to disable and enable heuristics for themselves usingbody.slopes.heuristics. null uses default, false disables and true enables. askariwa 1 Link to comment Share on other sites More sharing options...
askariwa Posted May 30, 2017 Share Posted May 30, 2017 On 29/5/2017 at 2:52 AM, hexus said: Thought I might as well update this thread with the changes between v0.2.0-beta and v0.2.0. v0.3.0 is now in the works! Great work Hexus, i really like the sprite scale support, btw i think you meant May (not June 2017). Any thought about what you're thinking to add to the v0.3.0 ? Link to comment Share on other sites More sharing options...
hexus Posted June 3, 2017 Author Share Posted June 3, 2017 Thanks! Yeah, actually, quite a good idea so far. I'll be removing the heuristics in place of smarter use of the SAT algorithm (this has already been done) Memory consumption improvements (mostly already done) There will be solutions implemented to help avoid tunnelling (such as swept intersection tests) There may be a built in raycaster for line intersection tests against tilemaps Auto-rotation for sprites based on collision vectors, optionally restricted to a range of angles For more, you can check out the roadmap. Whenever I get an idea for something that I'm pretty confident I want to implement, I put it there. For v1.0.0 I plan to build large polygons from the the tiles, as well as support actual polygons from Tiled maps as collision shapes/objects. There's a plugin that already does this by @michaelcalkins, called Arcade Polygons, which is in fact based on some of my code for the plugin and initial SAT proof of concept, but I've planned to do something like that from the beginning. jpdev 1 Link to comment Share on other sites More sharing options...
hexus Posted August 5, 2017 Author Share Posted August 5, 2017 v0.3.0 is now a thing, with less features than intended because I just wanted to get the new collision handling out there. It now makes smarter use of the SAT algorithm to avoid unwanted collisions. The old, flaky heuristics are a thing of the past. It should also be less memory hungry. No more calls to .clone() on SAT response objects or vectors. They're all pooled now, with use of .copy() instead. In my own game development, I also found issues with the consistency of the response objects when unwanted collisions were ignored. This should now no longer be an issue. I discovered this when I used the collision vectors to rotate a player sprite (a feature that will be built in to the plugin at some point). Quote v0.3.0 - 5th August 2017 Removed the snap feature (#34) Removed heuristics in favour of a custom SAT implementation that prevents internal edge collisions (#36, #38, #40) Implemented debug rendering for tile normals and ignored tile normals Implemented simple object pooling for less memory-hungry calculations (#42) Improved the consistency of SAT responses and overlap values set on physics bodies samme 1 Link to comment Share on other sites More sharing options...
colinvella Posted October 14, 2017 Share Posted October 14, 2017 Great job! I'm aware there is a types file for Typescript, but how do you use Slopes in a Typescript-based phaser game? Is there a Typescript/Arcade Slopes tutorial or demo code? Link to comment Share on other sites More sharing options...
Recommended Posts