Git Product home page Git Product logo

phaser-tilemap-plus-demo's Introduction

phaser-tilemap-plus-demo's People

Contributors

colinvella avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ekiscrim umeruma

phaser-tilemap-plus-demo's Issues

Body.plus does not have contactNormal (also missing other fields)

I forked and downloaded the repo, ran npm install, then npm start. I can see the title screen and that works, but once the game starts it crashes in the PlayState update() when it tries to access body.plus.contactNormal.length(). However, I changed the code to avoid using the normals and was able to get the demo to actually display the game map. Obviously the game didn't function without movement and whatnot, but all of the tiles were animated, etc.

I'm running NPM 3.10.10 with your most up to date version. Previously had version 0.9.1 or so and the issue was also present there.
From package.json:

"dependencies": {
    "lodash": "^4.17.4",
    "phaser-ce": "^2.9.1",
    "phaser-tilemap-plus": "^0.10.2",
    "poly-decomp": "^0.2.1"
  },

Here's the contents of body.plus when it errors out on Cannot access property length of undefined on the attempted call to body.plus.contactNormal.length():

Contents of body.plus

  "shape": {
    "vertices": [
      {
        "x": 10,
        "y": -10
      },
      ...
      {
        "x": 10,
        "y": 10
      }
    ],
    "aabb": {
      "left": -10,
      "right": 10,
      "top": -19.84807753012208,
      "bottom": 19.84807753012208
    },
    "edges": [
      {
        "x": -0.6030737921409148,
        "y": -3.420201433256686
      },
      ...
      {
        "x": 0,
        "y": -20
      }
    ],
    "normals": [
      {
        "x": 0.9848077530122081,
        "y": -0.17364817766693003
      },
     ...
      {
        "x": 1,
        "y": 0
      }
    ],
    "count": 20,
    "centre": {
      "x": 8.881784197001253e-17,
      "y": 5.329070518200751e-16
    }
  }
}```

tilemapProperties is NULL

I cloned the repository, installed all the packages, but when I run it, just after hitting the space bar I get the errors: "Cannot read property 'playerStartX ' of undefined at PlayState.create (PlayState.js?5afc:74)" and "Cannot read property 'left' of null at PlayState.update (PlayState.js?5afc:134)".

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.