Giter Club home page Giter Club logo

Comments (14)

hexus avatar hexus commented on May 18, 2024 2

Yes, I'm planning to port the plugin for Phaser 3.

Development hasn't started yet, but I'm sure it'll show up in Phaser News once released.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024 1

Just to update this, hexus/phaser-slopes is now a thing after a month and a half of hacking away at MatterJS! The readme, tagged release and npm publish are in progress.

This is a new Phaser 3 plugin I've written that smooths out tilemap collisions for Matter, but it doesn't do anything for Arcade just yet.

I am still planning to either port or reimplement the behaviour of Arcade Slopes for the Phaser 3 plugin, it just might take a little while. 👼

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024 1

The aforementioned plugin has now been released. I'll post here and close this issue once it supports Arcade Physics.

from phaser-arcade-slopes.

Maeggi avatar Maeggi commented on May 18, 2024 1

That's amazing, thank you so much 👍

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024

I have plans to release a separate plugin for Phaser 3 that also includes similar improvements for MatterJS, not just Arcade.

i.e. a solution to this problem without sacrificing tiles:
http://labs.phaser.io/view.html?src=src/game%20objects/tilemap/collision/matter%20ghost%20collisions.js

from phaser-arcade-slopes.

AndreaBoeAbrahamsen avatar AndreaBoeAbrahamsen commented on May 18, 2024

Hope you dont mind me asking what the progress is on this one? I am really excited for slopes support in Phaser 3 Arcade Physics :)

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024

I've taken quite a break from Phaser related work lately, so I haven't continued development on these projects.

I'm still interested in implementing it though, as part of the hexus/phaser-slopes plugin. Feel free to keep an eye on both. Perhaps I'll be able to make some time over the summer. 🙂

from phaser-arcade-slopes.

AndreaBoeAbrahamsen avatar AndreaBoeAbrahamsen commented on May 18, 2024

Thank you for a quick response, and I understand well the need for a break from such a huge project. I am very interested in trying to implementing slopes in my game, and I would be eternally grateful if you could describe how you would go about implementing one of the slope tile types in Phaser 3, would you still use SAT? Would you override the collie method or would adding the slope collide logic to the processCallback be enough? If you dont have time I understand, thanks anyway 😃

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024

I totally empathise with that enthusiasm! Slopes are game-changers, pun intended. 😄

For the plugin, I would likely override the method if there was no easy way to augment Arcade's behaviour in Phaser 3 (and I'm not expecting there to be an easy way). That's how this Phaser 2 plugin works, and this helps keep the collision/overlap API the same for users of the plugin.

If you wanted to attempt this yourself using some SAT library, Arcade's process callback may well be enough for what you need, as it essentially lets you process the entire collision yourself. Inside such a callback, you could use your own polygon to represent the tile that's being collided with.

The tricky part is keeping these collisions smooth between tiles, and that's why I built a plugin in the first place. It's built to avoid collisions with internal edges; identical edges that belong to different tiles. That's where the real complexities lie.

For a super simple example of using SAT in Phaser 2 though, feel free to check out my phaser-sat-example project. It doesn't integrate with Arcade, but it should give you a pretty good idea.

I'm happier with how I've solved this problem in my initial Phaser 3 plugin, because it doesn't rely on heuristics or painstakingly manually tweaked data. Instead, it uses an algorithm ported from Box2D, which should work in all cases.

from phaser-arcade-slopes.

SHG42 avatar SHG42 commented on May 18, 2024

Good afternoon! I found your plugin after Googling around and I wanted to find out if you have any status updates on the Phaser 3 implementation for Arcade slopes?

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024

Hello!

I still haven't taken the time to implement this for the Arcade Physics engine in Phaser 3 over the past year because I haven't needed it for my own projects, but keep an eye on the hexus/phaser-slopes repo for new releases.

That plugin implements smooth collisions between contiguous tile edges for MatterJS, and may introduce the same functionality for Arcade Physics in the future too.

from phaser-arcade-slopes.

eliseubaldo avatar eliseubaldo commented on May 18, 2024

Hi,
Just joining @SHG42 and expecting the Phaser 3 update :)

from phaser-arcade-slopes.

valueerrorx avatar valueerrorx commented on May 18, 2024

hey @hexus - thank you very much for this plugin .. unfortunately it seems to have stopped working for phaser 3.54
any ideas ? thank you in advance :-)
Peek 2021-05-24 21-05

from phaser-arcade-slopes.

hexus avatar hexus commented on May 18, 2024

Hi @valueerrorx. This plugin (phaser-arcade-slopes) is not Phaser 3 compatible. hexus/phaser-slopes is, however it implements smooth collisions for contiguous internal edges for Matter.js, not Arcade.

Basically, my above comments still stand. I haven't had the chance to work on these plugins in a long time.

from phaser-arcade-slopes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.