Jump to content

Recommended Posts

  • 2 weeks later...
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

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • rich unpinned this topic
  • 3 months later...

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 using
    body.slopes.heuristics. null uses default, false disables and true
    enables.
Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

  • 2 months later...

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

 

Link to comment
Share on other sites

  • 2 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...