GithubHelp home page GithubHelp logo

Errors: "Unresolved slope type 'r' / Slope type r not defined", "tilemapLayer.getTileOffsetX is not a function" about phaser-arcade-slopes HOT 4 OPEN

hexus avatar hexus commented on July 22, 2024
Errors: "Unresolved slope type 'r' / Slope type r not defined", "tilemapLayer.getTileOffsetX is not a function"

from phaser-arcade-slopes.

Comments (4)

hexus avatar hexus commented on July 22, 2024

Hi! Thanks for reaching out.

At first glance of your error stack traces, I would assume it's caused by one of the following:

  • Tiled's tilemap data format has changed
  • The plugin is no longer compatible with the most recent versions of Phaser CE
  • The slope map has been registered with the plugin incorrectly

Without having looked at your code yet, I'd suggest trying to run your project with earlier versions of Phaser CE to see if it works. That would help you or I narrow it down. If it works in 2.10.x, for example, then it's likely an issue with your code, as that was the last version I tested the plugin with.

Hopefully I'll get some time to inspect your code, get it running, and figure out what's going wrong here.

from phaser-arcade-slopes.

SHG42 avatar SHG42 commented on July 22, 2024

Hi, thanks for the reply! I managed to resolve this by switching from using phaser-arcade-slopes.min.js to using the regular phaser-arcade-slopes.js file, and that worked. I had already installed Phaser CE 2.10 before installing the plugin, as I'd noticed that the compatibility chart ended there, so I was definitely having this issue with 2.10.x installed. My code worked as expected without needing any further modifications once I switched the js file. As to why switching the js file resolved the issue... well, that's beyond the scope of my experience as a coder, so I'll leave that up to you! I would be curious to know what happened, though, if you get a chance to look into it.

from phaser-arcade-slopes.

hexus avatar hexus commented on July 22, 2024

Oh, interesting! So the minified version is the only one that causes a problem, without changing anything else? I'm pretty much just passing it through uglify, so that surprises me. Maybe uglify needs updating.

Indeed the compatibility chart ends at 2.10.x, but may well support some later versions okay. I simply haven't tested them. 😄 Mostly using Phaser 3 these days.

from phaser-arcade-slopes.

SHG42 avatar SHG42 commented on July 22, 2024

Yep, it does seem that the minified file was causing the problem, which was very surprising to me as well. I had been going over my code with a fine-toothed comb trying to find mistakes, and I decided on a whim to try switching the files, and you can imagine my surprise when that did the trick.

Yeah, I had originally started this project in Phaser 3 (I just started learning Phaser last year, so I started with 3). Hadn't planned on needing to use CE, but I really wanted to use your plugin, LOL. I had been handling slopes with Matter and it was just not providing the results I wanted. I was actually quite shocked when I found out that Arcade doesn't handle slopes natively!

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.