diff --git a/examples/assets/physics/ninja-test-level.json b/examples/assets/physics/ninja-test-level.json new file mode 100644 index 00000000..4297c3f5 --- /dev/null +++ b/examples/assets/physics/ninja-test-level.json @@ -0,0 +1,39 @@ +{ "height":19, + "layers":[ + { + "data":[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 11, 0, 0, 0, 0, 0, 12, 2, 2, 2, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 19, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 11, 0, 0, 0, 12, 2, 2, 2, 2, 2, 2, 11, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 2, 2, 2, 11, 0, 13, 2, 2, 2, 2, 2, 2, 14, 0, 0, 0, 0, 0, 0, 0, 13, 2, 2, 2, 14, 0, 0, 0, 0, 0, 12, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 2, 2, 2, 2, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 2, 23, 0, 0, 0, 5, 6, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 31, 31, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 1, 0, 28, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 16, 20, 2, 2, 7, 8, 11, 0, 0, 12, 11, 0, 1, 12, 2, 2, 2, 2, 2, 30, 1, 0, 0, 4, 3, 0, 4, 3, 0, 0, 16, 20, 11, 12, 2, 2, 2, 11, 12, 2, 2, 2, 11, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], + "height":19, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":50, + "x":0, + "y":0 + }], + "orientation":"orthogonal", + "properties": + { + + }, + "tileheight":32, + "tilesets":[ + { + "firstgid":1, + "image":"..\/..\/..\/resources\/Ninja Physics Debug Tiles\/32px\/ninja-tiles32.png", + "imageheight":96, + "imagewidth":512, + "margin":0, + "name":"ninja-tiles32", + "properties": + { + + }, + "spacing":0, + "tileheight":32, + "tilewidth":32 + }], + "tilewidth":32, + "version":1, + "width":50 +} \ No newline at end of file diff --git a/examples/assets/physics/ninja-test-level.tmx b/examples/assets/physics/ninja-test-level.tmx new file mode 100644 index 00000000..b6674a90 --- /dev/null +++ b/examples/assets/physics/ninja-test-level.tmx @@ -0,0 +1,11 @@ + + + + + + + + AQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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IAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAA= + + + diff --git a/examples/assets/physics/ninja-tiles.png b/examples/assets/physics/ninja-tiles128.png similarity index 100% rename from examples/assets/physics/ninja-tiles.png rename to examples/assets/physics/ninja-tiles128.png diff --git a/examples/assets/physics/ninja-tiles32.png b/examples/assets/physics/ninja-tiles32.png new file mode 100644 index 00000000..e2f8639c Binary files /dev/null and b/examples/assets/physics/ninja-tiles32.png differ diff --git a/examples/assets/physics/ninja-tiles64.png b/examples/assets/physics/ninja-tiles64.png new file mode 100644 index 00000000..a99c246f Binary files /dev/null and b/examples/assets/physics/ninja-tiles64.png differ diff --git a/examples/wip/ninja3.js b/examples/wip/ninja3.js new file mode 100644 index 00000000..06a3fa48 --- /dev/null +++ b/examples/wip/ninja3.js @@ -0,0 +1,108 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render }); +// var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.spritesheet('ninja-tiles', 'assets/physics/ninja-tiles32.png', 32, 32, 34); + game.load.json('level', 'assets/physics/ninja-test-level.json'); + game.load.image('ball', 'assets/sprites/shinyball.png'); + game.load.image('sky', 'assets/skies/sky2.png'); + +} + +var sprite1; +var tiles; +var cursors; + + +function create() { + + var sky = game.add.image(0, 0, 'sky'); + sky.fixedToCamera = true; + + // Activate the Ninja physics system + game.physics.startSystem(Phaser.Physics.NINJA); + + sprite1 = game.add.sprite(100, 0, 'ball'); + + // Enable the physics body for the Ninja physics system + game.physics.ninja.enableCircle(sprite1, sprite1.width / 2); + + // A little more bounce + sprite1.body.bounce = 0.5; + + var layer = game.cache.getJSON('level').layers[0]; + var i = 0; + var data = layer.data; + var width = layer.width; + var height = layer.height; + + // Resize the world to match + game.world.setBounds(0, 0, width * 32, height * 32); + + tiles = game.add.group(); + + var tile; + + for (var y = 0; y < height; y++) + { + for (var x = 0; x < width; x++) + { + if (data[i] > 0) + { + tile = tiles.create(x * 32, y * 32, 'ninja-tiles', data[i] - 1); + game.physics.ninja.enableTile(tile, tile.frame); + } + + i++; + } + } + + cursors = game.input.keyboard.createCursorKeys(); + + game.camera.follow(sprite1); + +} + +function update() { + + game.physics.ninja.collide(sprite1, tiles); + + // sprite1.body.setZeroVelocity(); + + if (cursors.left.isDown) + { + sprite1.body.moveLeft(20); + } + else if (cursors.right.isDown) + { + sprite1.body.moveRight(20); + } + + if (cursors.up.isDown) + { + sprite1.body.moveUp(20); + } + else if (cursors.down.isDown) + { + sprite1.body.moveUp(20); + } + +} + +function render() { + + // game.debug.text(sprite1.body.shape.velocity.x, 32, 32); + // game.debug.text(sprite1.body.shape.velocity.y, 32, 64); + // game.debug.text(game.math.radToDeg(sprite1.body.angle), 32, 96); + + // tile1.render(game.context, 'ninja-tiles'); + // tile2.render(game.context, 'ninja-tiles'); + + // game.debug.geom(sprite1.body, 'rgba(0,255,0,0.4)', true, 1); + + // game.debug.geom(tile1, 'rgba(0,255,0,0.4)', true, 1); + // game.debug.geom(tile1, 'rgba(0,255,0,0.4)', true, 1); + +} diff --git a/resources/Ninja Physics Debug Tiles/0.png b/resources/Ninja Physics Debug Tiles/128px/0.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/0.png rename to resources/Ninja Physics Debug Tiles/128px/0.png diff --git a/resources/Ninja Physics Debug Tiles/1.png b/resources/Ninja Physics Debug Tiles/128px/1.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/1.png rename to resources/Ninja Physics Debug Tiles/128px/1.png diff --git a/resources/Ninja Physics Debug Tiles/10.png b/resources/Ninja Physics Debug Tiles/128px/10.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/10.png rename to resources/Ninja Physics Debug Tiles/128px/10.png diff --git a/resources/Ninja Physics Debug Tiles/11.png b/resources/Ninja Physics Debug Tiles/128px/11.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/11.png rename to resources/Ninja Physics Debug Tiles/128px/11.png diff --git a/resources/Ninja Physics Debug Tiles/12.png b/resources/Ninja Physics Debug Tiles/128px/12.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/12.png rename to resources/Ninja Physics Debug Tiles/128px/12.png diff --git a/resources/Ninja Physics Debug Tiles/13.png b/resources/Ninja Physics Debug Tiles/128px/13.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/13.png rename to resources/Ninja Physics Debug Tiles/128px/13.png diff --git a/resources/Ninja Physics Debug Tiles/14.png b/resources/Ninja Physics Debug Tiles/128px/14.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/14.png rename to resources/Ninja Physics Debug Tiles/128px/14.png diff --git a/resources/Ninja Physics Debug Tiles/15.png b/resources/Ninja Physics Debug Tiles/128px/15.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/15.png rename to resources/Ninja Physics Debug Tiles/128px/15.png diff --git a/resources/Ninja Physics Debug Tiles/16.png b/resources/Ninja Physics Debug Tiles/128px/16.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/16.png rename to resources/Ninja Physics Debug Tiles/128px/16.png diff --git a/resources/Ninja Physics Debug Tiles/17.png b/resources/Ninja Physics Debug Tiles/128px/17.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/17.png rename to resources/Ninja Physics Debug Tiles/128px/17.png diff --git a/resources/Ninja Physics Debug Tiles/18.png b/resources/Ninja Physics Debug Tiles/128px/18.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/18.png rename to resources/Ninja Physics Debug Tiles/128px/18.png diff --git a/resources/Ninja Physics Debug Tiles/19.png b/resources/Ninja Physics Debug Tiles/128px/19.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/19.png rename to resources/Ninja Physics Debug Tiles/128px/19.png diff --git a/resources/Ninja Physics Debug Tiles/2.png b/resources/Ninja Physics Debug Tiles/128px/2.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/2.png rename to resources/Ninja Physics Debug Tiles/128px/2.png diff --git a/resources/Ninja Physics Debug Tiles/20.png b/resources/Ninja Physics Debug Tiles/128px/20.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/20.png rename to resources/Ninja Physics Debug Tiles/128px/20.png diff --git a/resources/Ninja Physics Debug Tiles/21.png b/resources/Ninja Physics Debug Tiles/128px/21.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/21.png rename to resources/Ninja Physics Debug Tiles/128px/21.png diff --git a/resources/Ninja Physics Debug Tiles/22.png b/resources/Ninja Physics Debug Tiles/128px/22.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/22.png rename to resources/Ninja Physics Debug Tiles/128px/22.png diff --git a/resources/Ninja Physics Debug Tiles/23.png b/resources/Ninja Physics Debug Tiles/128px/23.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/23.png rename to resources/Ninja Physics Debug Tiles/128px/23.png diff --git a/resources/Ninja Physics Debug Tiles/24.png b/resources/Ninja Physics Debug Tiles/128px/24.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/24.png rename to resources/Ninja Physics Debug Tiles/128px/24.png diff --git a/resources/Ninja Physics Debug Tiles/25.png b/resources/Ninja Physics Debug Tiles/128px/25.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/25.png rename to resources/Ninja Physics Debug Tiles/128px/25.png diff --git a/resources/Ninja Physics Debug Tiles/26.png b/resources/Ninja Physics Debug Tiles/128px/26.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/26.png rename to resources/Ninja Physics Debug Tiles/128px/26.png diff --git a/resources/Ninja Physics Debug Tiles/27.png b/resources/Ninja Physics Debug Tiles/128px/27.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/27.png rename to resources/Ninja Physics Debug Tiles/128px/27.png diff --git a/resources/Ninja Physics Debug Tiles/28.png b/resources/Ninja Physics Debug Tiles/128px/28.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/28.png rename to resources/Ninja Physics Debug Tiles/128px/28.png diff --git a/resources/Ninja Physics Debug Tiles/29.png b/resources/Ninja Physics Debug Tiles/128px/29.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/29.png rename to resources/Ninja Physics Debug Tiles/128px/29.png diff --git a/resources/Ninja Physics Debug Tiles/3.png b/resources/Ninja Physics Debug Tiles/128px/3.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/3.png rename to resources/Ninja Physics Debug Tiles/128px/3.png diff --git a/resources/Ninja Physics Debug Tiles/30.png b/resources/Ninja Physics Debug Tiles/128px/30.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/30.png rename to resources/Ninja Physics Debug Tiles/128px/30.png diff --git a/resources/Ninja Physics Debug Tiles/31.png b/resources/Ninja Physics Debug Tiles/128px/31.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/31.png rename to resources/Ninja Physics Debug Tiles/128px/31.png diff --git a/resources/Ninja Physics Debug Tiles/32.png b/resources/Ninja Physics Debug Tiles/128px/32.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/32.png rename to resources/Ninja Physics Debug Tiles/128px/32.png diff --git a/resources/Ninja Physics Debug Tiles/33.png b/resources/Ninja Physics Debug Tiles/128px/33.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/33.png rename to resources/Ninja Physics Debug Tiles/128px/33.png diff --git a/resources/Ninja Physics Debug Tiles/4.png b/resources/Ninja Physics Debug Tiles/128px/4.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/4.png rename to resources/Ninja Physics Debug Tiles/128px/4.png diff --git a/resources/Ninja Physics Debug Tiles/5.png b/resources/Ninja Physics Debug Tiles/128px/5.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/5.png rename to resources/Ninja Physics Debug Tiles/128px/5.png diff --git a/resources/Ninja Physics Debug Tiles/6.png b/resources/Ninja Physics Debug Tiles/128px/6.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/6.png rename to resources/Ninja Physics Debug Tiles/128px/6.png diff --git a/resources/Ninja Physics Debug Tiles/7.png b/resources/Ninja Physics Debug Tiles/128px/7.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/7.png rename to resources/Ninja Physics Debug Tiles/128px/7.png diff --git a/resources/Ninja Physics Debug Tiles/8.png b/resources/Ninja Physics Debug Tiles/128px/8.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/8.png rename to resources/Ninja Physics Debug Tiles/128px/8.png diff --git a/resources/Ninja Physics Debug Tiles/9.png b/resources/Ninja Physics Debug Tiles/128px/9.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/9.png rename to resources/Ninja Physics Debug Tiles/128px/9.png diff --git a/resources/Ninja Physics Debug Tiles/ninja-tiles.png b/resources/Ninja Physics Debug Tiles/128px/ninja-tiles128.png similarity index 100% rename from resources/Ninja Physics Debug Tiles/ninja-tiles.png rename to resources/Ninja Physics Debug Tiles/128px/ninja-tiles128.png diff --git a/resources/Ninja Physics Debug Tiles/32px/0.png b/resources/Ninja Physics Debug Tiles/32px/0.png new file mode 100644 index 00000000..7d174b9f Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/0.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/1.png b/resources/Ninja Physics Debug Tiles/32px/1.png new file mode 100644 index 00000000..521f07a1 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/1.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/10.png b/resources/Ninja Physics Debug Tiles/32px/10.png new file mode 100644 index 00000000..da426e9d Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/10.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/11.png b/resources/Ninja Physics Debug Tiles/32px/11.png new file mode 100644 index 00000000..6ee4fc08 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/11.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/12.png b/resources/Ninja Physics Debug Tiles/32px/12.png new file mode 100644 index 00000000..797d249b Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/12.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/13.png b/resources/Ninja Physics Debug Tiles/32px/13.png new file mode 100644 index 00000000..960c3b60 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/13.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/14.png b/resources/Ninja Physics Debug Tiles/32px/14.png new file mode 100644 index 00000000..8c5123c0 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/14.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/15.png b/resources/Ninja Physics Debug Tiles/32px/15.png new file mode 100644 index 00000000..9905a28d Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/15.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/16.png b/resources/Ninja Physics Debug Tiles/32px/16.png new file mode 100644 index 00000000..fdf18520 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/16.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/17.png b/resources/Ninja Physics Debug Tiles/32px/17.png new file mode 100644 index 00000000..bd3554ea Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/17.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/18.png b/resources/Ninja Physics Debug Tiles/32px/18.png new file mode 100644 index 00000000..08477adf Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/18.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/19.png b/resources/Ninja Physics Debug Tiles/32px/19.png new file mode 100644 index 00000000..70bda49a Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/19.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/2.png b/resources/Ninja Physics Debug Tiles/32px/2.png new file mode 100644 index 00000000..c37f2f98 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/2.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/20.png b/resources/Ninja Physics Debug Tiles/32px/20.png new file mode 100644 index 00000000..de0ddab9 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/20.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/21.png b/resources/Ninja Physics Debug Tiles/32px/21.png new file mode 100644 index 00000000..502d751d Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/21.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/22.png b/resources/Ninja Physics Debug Tiles/32px/22.png new file mode 100644 index 00000000..2759e11c Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/22.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/23.png b/resources/Ninja Physics Debug Tiles/32px/23.png new file mode 100644 index 00000000..b6af6c9e Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/23.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/24.png b/resources/Ninja Physics Debug Tiles/32px/24.png new file mode 100644 index 00000000..c6fd1d55 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/24.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/25.png b/resources/Ninja Physics Debug Tiles/32px/25.png new file mode 100644 index 00000000..5682964f Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/25.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/26.png b/resources/Ninja Physics Debug Tiles/32px/26.png new file mode 100644 index 00000000..6a305bce Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/26.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/27.png b/resources/Ninja Physics Debug Tiles/32px/27.png new file mode 100644 index 00000000..1706da06 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/27.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/28.png b/resources/Ninja Physics Debug Tiles/32px/28.png new file mode 100644 index 00000000..8172f9f7 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/28.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/29.png b/resources/Ninja Physics Debug Tiles/32px/29.png new file mode 100644 index 00000000..5aa75bac Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/29.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/3.png b/resources/Ninja Physics Debug Tiles/32px/3.png new file mode 100644 index 00000000..6f190604 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/3.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/30.png b/resources/Ninja Physics Debug Tiles/32px/30.png new file mode 100644 index 00000000..6394d7f5 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/30.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/31.png b/resources/Ninja Physics Debug Tiles/32px/31.png new file mode 100644 index 00000000..678cb442 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/31.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/32.png b/resources/Ninja Physics Debug Tiles/32px/32.png new file mode 100644 index 00000000..00c9b959 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/32.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/33.png b/resources/Ninja Physics Debug Tiles/32px/33.png new file mode 100644 index 00000000..aa15579a Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/33.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/4.png b/resources/Ninja Physics Debug Tiles/32px/4.png new file mode 100644 index 00000000..63094298 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/4.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/5.png b/resources/Ninja Physics Debug Tiles/32px/5.png new file mode 100644 index 00000000..c228df53 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/5.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/6.png b/resources/Ninja Physics Debug Tiles/32px/6.png new file mode 100644 index 00000000..fd0e60c8 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/6.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/7.png b/resources/Ninja Physics Debug Tiles/32px/7.png new file mode 100644 index 00000000..b3862c5e Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/7.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/8.png b/resources/Ninja Physics Debug Tiles/32px/8.png new file mode 100644 index 00000000..226423db Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/8.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/9.png b/resources/Ninja Physics Debug Tiles/32px/9.png new file mode 100644 index 00000000..58a7bc8b Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/9.png differ diff --git a/resources/Ninja Physics Debug Tiles/32px/ninja-tiles32.png b/resources/Ninja Physics Debug Tiles/32px/ninja-tiles32.png new file mode 100644 index 00000000..e2f8639c Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/32px/ninja-tiles32.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/0.png b/resources/Ninja Physics Debug Tiles/64px/0.png new file mode 100644 index 00000000..295301d1 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/0.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/1.png b/resources/Ninja Physics Debug Tiles/64px/1.png new file mode 100644 index 00000000..3d613025 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/1.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/10.png b/resources/Ninja Physics Debug Tiles/64px/10.png new file mode 100644 index 00000000..01fb335f Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/10.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/11.png b/resources/Ninja Physics Debug Tiles/64px/11.png new file mode 100644 index 00000000..f7658f44 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/11.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/12.png b/resources/Ninja Physics Debug Tiles/64px/12.png new file mode 100644 index 00000000..8223e543 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/12.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/13.png b/resources/Ninja Physics Debug Tiles/64px/13.png new file mode 100644 index 00000000..dd99b22d Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/13.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/14.png b/resources/Ninja Physics Debug Tiles/64px/14.png new file mode 100644 index 00000000..d46041e3 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/14.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/15.png b/resources/Ninja Physics Debug Tiles/64px/15.png new file mode 100644 index 00000000..9bd523e6 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/15.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/16.png b/resources/Ninja Physics Debug Tiles/64px/16.png new file mode 100644 index 00000000..73f467be Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/16.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/17.png b/resources/Ninja Physics Debug Tiles/64px/17.png new file mode 100644 index 00000000..92387907 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/17.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/18.png b/resources/Ninja Physics Debug Tiles/64px/18.png new file mode 100644 index 00000000..bf89fb30 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/18.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/19.png b/resources/Ninja Physics Debug Tiles/64px/19.png new file mode 100644 index 00000000..b178a0b6 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/19.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/2.png b/resources/Ninja Physics Debug Tiles/64px/2.png new file mode 100644 index 00000000..e0f6a476 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/2.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/20.png b/resources/Ninja Physics Debug Tiles/64px/20.png new file mode 100644 index 00000000..063711a5 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/20.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/21.png b/resources/Ninja Physics Debug Tiles/64px/21.png new file mode 100644 index 00000000..5cd159d6 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/21.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/22.png b/resources/Ninja Physics Debug Tiles/64px/22.png new file mode 100644 index 00000000..46a97c9b Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/22.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/23.png b/resources/Ninja Physics Debug Tiles/64px/23.png new file mode 100644 index 00000000..6d470144 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/23.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/24.png b/resources/Ninja Physics Debug Tiles/64px/24.png new file mode 100644 index 00000000..546273d2 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/24.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/25.png b/resources/Ninja Physics Debug Tiles/64px/25.png new file mode 100644 index 00000000..346e04fc Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/25.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/26.png b/resources/Ninja Physics Debug Tiles/64px/26.png new file mode 100644 index 00000000..ba094432 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/26.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/27.png b/resources/Ninja Physics Debug Tiles/64px/27.png new file mode 100644 index 00000000..8ae218fa Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/27.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/28.png b/resources/Ninja Physics Debug Tiles/64px/28.png new file mode 100644 index 00000000..ed93c142 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/28.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/29.png b/resources/Ninja Physics Debug Tiles/64px/29.png new file mode 100644 index 00000000..d962611b Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/29.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/3.png b/resources/Ninja Physics Debug Tiles/64px/3.png new file mode 100644 index 00000000..a2ca235f Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/3.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/30.png b/resources/Ninja Physics Debug Tiles/64px/30.png new file mode 100644 index 00000000..15900f25 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/30.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/31.png b/resources/Ninja Physics Debug Tiles/64px/31.png new file mode 100644 index 00000000..1d55e3a8 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/31.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/32.png b/resources/Ninja Physics Debug Tiles/64px/32.png new file mode 100644 index 00000000..85798d93 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/32.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/33.png b/resources/Ninja Physics Debug Tiles/64px/33.png new file mode 100644 index 00000000..5629351d Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/33.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/4.png b/resources/Ninja Physics Debug Tiles/64px/4.png new file mode 100644 index 00000000..d13e31a3 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/4.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/5.png b/resources/Ninja Physics Debug Tiles/64px/5.png new file mode 100644 index 00000000..b728dd04 Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/5.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/6.png b/resources/Ninja Physics Debug Tiles/64px/6.png new file mode 100644 index 00000000..a805134e Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/6.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/7.png b/resources/Ninja Physics Debug Tiles/64px/7.png new file mode 100644 index 00000000..159bc84e Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/7.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/8.png b/resources/Ninja Physics Debug Tiles/64px/8.png new file mode 100644 index 00000000..03fb739e Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/8.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/9.png b/resources/Ninja Physics Debug Tiles/64px/9.png new file mode 100644 index 00000000..734ae2db Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/9.png differ diff --git a/resources/Ninja Physics Debug Tiles/64px/ninja-tiles64.png b/resources/Ninja Physics Debug Tiles/64px/ninja-tiles64.png new file mode 100644 index 00000000..a99c246f Binary files /dev/null and b/resources/Ninja Physics Debug Tiles/64px/ninja-tiles64.png differ diff --git a/src/physics/Physics.js b/src/physics/Physics.js index d346bf01..16a9b981 100644 --- a/src/physics/Physics.js +++ b/src/physics/Physics.js @@ -94,7 +94,7 @@ Phaser.Physics.prototype = { * Phaser.Physics.Arcade is running by default, but all others need activating directly. * You can start the following physics systems: * Phaser.Physics.P2 - A full-body advanced physics system by Stefan Hedman. - * Phaser.Physics.NINJA - A port of the metanet N+ physics system. + * Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. * Phaser.Physics.BOX2D and Phaser.Physics.CHIPMUNK are still in development. * * @method Phaser.Physics#startSystem @@ -132,7 +132,7 @@ Phaser.Physics.prototype = { * * Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation. * Phaser.Physics.P2 - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints. - * Phaser.Physics.NINJA - A port of the metanet N+ physics system. Advanced AABB and Circle vs. Tile collision. + * Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision. * Phaser.Physics.BOX2D and Phaser.Physics.CHIPMUNK are still in development. * * @method Phaser.Physics#enable @@ -203,6 +203,11 @@ Phaser.Physics.prototype = { */ setBoundsToWorld: function () { + if (this.ninja) + { + this.ninja.setBoundsToWorld(); + } + }, /** diff --git a/src/physics/ninja/AABB.js b/src/physics/ninja/AABB.js index eec3189a..6010ebf0 100644 --- a/src/physics/ninja/AABB.js +++ b/src/physics/ninja/AABB.js @@ -6,11 +6,16 @@ /** * Ninja Physics AABB constructor. +* Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * * @class Phaser.Physics.Ninja.AABB * @classdesc Arcade Physics Constructor * @constructor -* @param {Phaser.Game} game reference to the current game instance. +* @param {Phaser.Physics.Ninja} system - A reference to the physics system. +* @param {number} x - The x coordinate to create this shape at. +* @param {number} y - The y coordinate to create this shape at. +* @param {number} width - The width of this AABB. +* @param {number} height - The height of this AABB. */ Phaser.Physics.Ninja.AABB = function (system, x, y, width, height) { diff --git a/src/physics/ninja/Body.js b/src/physics/ninja/Body.js index 18362e49..75e2ab33 100644 --- a/src/physics/ninja/Body.js +++ b/src/physics/ninja/Body.js @@ -63,37 +63,66 @@ Phaser.Physics.Ninja.Body = function (system, sprite, type, id, radius) { */ this.shape = null; + var sx = sprite.x; + var sy = sprite.y; + + if (sprite.anchor.x === 0) + { + sx += (sprite.width * 0.5); + } + + if (sprite.anchor.y === 0) + { + sy += (sprite.height * 0.5); + } + if (type === 1) { - this.aabb = new Phaser.Physics.Ninja.AABB(system, sprite.x, sprite.y, sprite.width, sprite.height); + this.aabb = new Phaser.Physics.Ninja.AABB(this, sx, sy, sprite.width, sprite.height); this.shape = this.aabb; } else if (type === 2) { - this.circle = new Phaser.Physics.Ninja.Circle(system, sprite.x, sprite.y, radius); + this.circle = new Phaser.Physics.Ninja.Circle(this, sx, sy, radius); this.shape = this.circle; } else if (type === 3) { - this.tile = new Phaser.Physics.Ninja.Tile(system, sprite.x, sprite.y, sprite.width, sprite.height, id); + this.tile = new Phaser.Physics.Ninja.Tile(this, sx, sy, sprite.width, sprite.height, id); this.shape = this.tile; } + // Setting drag to 0 and friction to 0 means you get a normalised speed (px psec) + + /** + * @property {number} drag - The drag applied to this object as it moves. + * @default + */ + this.drag = 1; + + /** + * @property {number} friction - The friction applied to this object as it moves. + * @default + */ + this.friction = 0.05; + + /** + * @property {number} gravityScale - How much of the world gravity should be applied to this object? 1 = all of it, 0.5 = 50%, etc. + * @default + */ + this.gravityScale = 1; + + /** + * @property {number} bounce - The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering. + * @default + */ + this.bounce = 0.3; + /** * @property {Phaser.Point} velocity - The velocity in pixels per second sq. of the Body. */ this.velocity = new Phaser.Point(); - /** - * @property {Phaser.Point} drag - The drag applied to the motion of the Body. - */ - this.drag = new Phaser.Point(); - - /** - * @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity. - */ - this.bounce = new Phaser.Point(); - /** * @property {boolean} skipQuadTree - If the Body is an irregular shape you can set this to true to avoid it being added to any QuadTrees. * @default diff --git a/src/physics/ninja/Circle.js b/src/physics/ninja/Circle.js index 0c6ac3cf..9c31a257 100644 --- a/src/physics/ninja/Circle.js +++ b/src/physics/ninja/Circle.js @@ -6,33 +6,77 @@ /** * Ninja Physics Circle constructor. +* Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * * @class Phaser.Physics.Ninja.Circle * @classdesc Arcade Physics Constructor * @constructor -* @param {Phaser.Game} game reference to the current game instance. +* @param {Phaser.Physics.Ninja.Body} body - The body that owns this shape. +* @param {number} x - The x coordinate to create this shape at. +* @param {number} y - The y coordinate to create this shape at. +* @param {number} radius - The radius of this Circle. */ -Phaser.Physics.Ninja.Circle = function (system, x, y, radius) { +Phaser.Physics.Ninja.Circle = function (body, x, y, radius) { - this.system = system; + /** + * @property {Phaser.Physics.Ninja.Body} system - A reference to the body that owns this shape. + */ + this.body = body; + + /** + * @property {Phaser.Physics.Ninja} system - A reference to the physics system. + */ + this.system = body.system; + + /** + * @property {Phaser.Point} pos - The position of this object. + */ this.pos = new Phaser.Point(x, y); + + /** + * @property {Phaser.Point} oldpos - The position of this object in the previous update. + */ this.oldpos = new Phaser.Point(x, y); + + /** + * @property {number} radius - The radius of this circle shape. + */ this.radius = radius; + /** + * @property {number} width - The width. + * @readonly + */ this.width = radius * 2; + + /** + * @property {number} height - The height. + * @readonly + */ this.height = radius * 2; + /** + * @property {number} oH - Internal var. + * @private + */ this.oH = 0; + + /** + * @property {number} oV - Internal var. + * @private + */ this.oV = 0; - // Setting drag to 0 and friction to 0 means you get a normalised speed (px psec) - this.drag = 1; - this.friction = 0.05; - this.gravityScale = 1; - this.bounce = 0.3; + /** + * @property {Phaser.Point} velocity - The velocity of this object. + */ this.velocity = new Phaser.Point(); + /** + * @property {object} circleTileProjections - All of the collision response handlers. + */ this.circleTileProjections = {}; + this.circleTileProjections[Phaser.Physics.Ninja.Tile.TYPE_FULL] = this.projCircle_Full; this.circleTileProjections[Phaser.Physics.Ninja.Tile.TYPE_45DEG] = this.projCircle_45Deg; this.circleTileProjections[Phaser.Physics.Ninja.Tile.TYPE_CONCAVE] = this.projCircle_Concave; @@ -64,8 +108,8 @@ Phaser.Physics.Ninja.Circle.prototype = { var py = this.pos.y; // integrate - this.pos.x += (this.drag * this.pos.x) - (this.drag * this.oldpos.x); - this.pos.y += (this.drag * this.pos.y) - (this.drag * this.oldpos.y) + (this.system.gravity * this.gravityScale); + this.pos.x += (this.body.drag * this.pos.x) - (this.body.drag * this.oldpos.x); + this.pos.y += (this.body.drag * this.pos.y) - (this.body.drag * this.oldpos.y) + (this.system.gravity * this.body.gravityScale); // store this.velocity.set(this.pos.x - px, this.pos.y - py); @@ -88,29 +132,28 @@ Phaser.Physics.Ninja.Circle.prototype = { var p = this.pos; var o = this.oldpos; - //calc velocity + // Calc velocity var vx = p.x - o.x; var vy = p.y - o.y; - //find component of velocity parallel to collision normal + // Find component of velocity parallel to collision normal var dp = (vx * dx + vy * dy); - var nx = dp * dx;//project velocity onto collision normal + var nx = dp * dx; //project velocity onto collision normal - var ny = dp * dy;//nx,ny is normal velocity + var ny = dp * dy; //nx,ny is normal velocity - var tx = vx - nx;//px,py is tangent velocity + var tx = vx - nx; //px,py is tangent velocity var ty = vy - ny; - //we only want to apply collision response forces if the object is travelling into, and not out of, the collision - var b, bx, by, f, fx, fy; + // We only want to apply collision response forces if the object is travelling into, and not out of, the collision + var b, bx, by, fx, fy; if (dp < 0) { - //f = FRICTION; - fx = tx * this.friction; - fy = ty * this.friction; + fx = tx * this.body.friction; + fy = ty * this.body.friction; - b = 1 + this.bounce; + b = 1 + this.body.bounce; bx = (nx * b); by = (ny * b); @@ -118,14 +161,16 @@ Phaser.Physics.Ninja.Circle.prototype = { } else { - //moving out of collision, do not apply forces + // Moving out of collision, do not apply forces bx = by = fx = fy = 0; } - p.x += px;//project object out of collision + // Project object out of collision + p.x += px; p.y += py; - o.x += px + bx + fx;//apply bounce+friction impulses which alter velocity + // Apply bounce+friction impulses which alter velocity + o.x += px + bx + fx; o.y += py + by + fy; }, @@ -197,40 +242,41 @@ Phaser.Physics.Ninja.Circle.prototype = { var txw = c.xw; var tyw = c.yw; - var dx = pos.x - tx;//tile->obj delta - var px = (txw + r) - Math.abs(dx);//penetration depth in x + var dx = pos.x - tx; // tile->obj delta + var px = (txw + r) - Math.abs(dx); // penetration depth in x if (0 < px) { - var dy = pos.y - ty;//tile->obj delta - var py = (tyw + r) - Math.abs(dy);//pen depth in y + var dy = pos.y - ty; // tile->obj delta + var py = (tyw + r) - Math.abs(dy); // pen depth in y if (0 < py) { - //object may be colliding with tile + // object may be colliding with tile - //determine grid/voronoi region of circle center + // determine grid/voronoi region of circle center this.oH = 0; this.oV = 0; + if (dx < -txw) { - //circle is on left side of tile + // circle is on left side of tile this.oH = -1; } else if (txw < dx) { - //circle is on right side of tile + // circle is on right side of tile this.oH = 1; } if (dy < -tyw) { - //circle is on top side of tile + // circle is on top side of tile this.oV = -1; } else if (tyw < dy) { - //circle is on bottom side of tile + // circle is on bottom side of tile this.oV = 1; } @@ -260,7 +306,7 @@ Phaser.Physics.Ninja.Circle.prototype = { } else { - console.log("ResolveCircleTile() was called with an empty (or unknown) tile!: ID=" + t.id + ")"); + // console.log("ResolveCircleTile() was called with an empty (or unknown) tile!: ID=" + t.id + ")"); return false; } @@ -352,6 +398,7 @@ Phaser.Physics.Ninja.Circle.prototype = { var len = Math.sqrt(dx * dx + dy * dy); var pen = obj.radius - len; + if (0 < pen) { //vertex is in the circle; project outward @@ -417,6 +464,7 @@ Phaser.Physics.Ninja.Circle.prototype = { //if the dotprod of (ox,oy) and (sx,sy) is negative, the innermost point is in the slope //and we need toproject it out by the magnitude of the projection of (ox,oy) onto (sx,sy) var dp = (ox * sx) + (oy * sy); + if (dp < 0) { //collision; project delta onto slope and use this as the slope penetration vector diff --git a/src/physics/ninja/Tile.js b/src/physics/ninja/Tile.js index 4312115b..12a0d628 100644 --- a/src/physics/ninja/Tile.js +++ b/src/physics/ninja/Tile.js @@ -6,22 +6,53 @@ /** * Ninja Physics Tile constructor. +* +* Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * * @class Phaser.Physics.Ninja.Tile -* @classdesc Arcade Physics Constructor +* @classdesc The Ninja Physics Tile class. Based on code by Metanet Software. * @constructor -* @param {Phaser.Game} game reference to the current game instance. +* @param {Phaser.Physics.Ninja.Body} body - The body that owns this shape. +* @param {number} x - The x coordinate to create this shape at. +* @param {number} y - The y coordinate to create this shape at. +* @param {number} width - The width of this AABB. +* @param {number} height - The height of this AABB. +* @param {number} [type=1] - The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. */ -Phaser.Physics.Ninja.Tile = function (system, x, y, width, height, type) { +Phaser.Physics.Ninja.Tile = function (body, x, y, width, height, type) { if (typeof type === 'undefined') { type = Phaser.Physics.Ninja.Tile.EMPTY; } - this.system = system; + /** + * @property {Phaser.Physics.Ninja.Body} system - A reference to the body that owns this shape. + */ + this.body = body; + /** + * @property {Phaser.Physics.Ninja} system - A reference to the physics system. + */ + this.system = body.system; + + /** + * @property {number} id - The ID of this Tile. + * @readonly + */ this.id = type; + + /** + * @property {number} type - The type of this Tile. + * @readonly + */ this.type = Phaser.Physics.Ninja.Tile.TYPE_EMPTY; + /** + * @property {Phaser.Point} pos - The position of this object. + */ this.pos = new Phaser.Point(x, y); + + /** + * @property {Phaser.Point} oldpos - The position of this object in the previous update. + */ this.oldpos = new Phaser.Point(x, y); if (this.id > 1 && this.id < 30) @@ -30,22 +61,57 @@ Phaser.Physics.Ninja.Tile = function (system, x, y, width, height, type) { height = width; } + /** + * @property {number} xw - Half the width. + * @readonly + */ this.xw = Math.abs(width / 2); + + /** + * @property {number} xw - Half the height. + * @readonly + */ this.yw = Math.abs(height / 2); + /** + * @property {number} width - The width. + * @readonly + */ this.width = width; + + /** + * @property {number} height - The height. + * @readonly + */ this.height = height; - this.drag = 1; - this.friction = 0.05; - this.gravityScale = 1; - this.bounce = 0.3; + /** + * @property {Phaser.Point} velocity - The velocity of this object. + */ this.velocity = new Phaser.Point(); - // This stores tile-specific collision information + /** + * @property {number} signx - Internal var. + * @private + */ this.signx = 0; + + /** + * @property {number} signy - Internal var. + * @private + */ this.signy = 0; + + /** + * @property {number} sx - Internal var. + * @private + */ this.sx = 0; + + /** + * @property {number} sy - Internal var. + * @private + */ this.sy = 0; if (this.id > 0) @@ -60,29 +126,37 @@ Phaser.Physics.Ninja.Tile.prototype.constructor = Phaser.Physics.Ninja.Tile; Phaser.Physics.Ninja.Tile.prototype = { /** - * Updates this AABBs position. + * Updates this objects position. * - * @method Phaser.Physics.Ninja.AABB#integrate + * @method Phaser.Physics.Ninja.Tile#integrate */ integrate: function () { var px = this.pos.x; var py = this.pos.y; - this.pos.x += (this.drag * this.pos.x) - (this.drag * this.oldpos.x); - this.pos.y += (this.drag * this.pos.y) - (this.drag * this.oldpos.y); + this.pos.x += (this.body.drag * this.pos.x) - (this.body.drag * this.oldpos.x); + this.pos.y += (this.body.drag * this.pos.y) - (this.body.drag * this.oldpos.y); this.velocity.set(this.pos.x - px, this.pos.y - py); this.oldpos.set(px, py); }, + /** + * Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body. + * + * @method Phaser.Physics.Ninja.Tile#collideWorldBounds + */ collideWorldBounds: function () { }, - //these functions are used to update the cell - //note: id is assumed to NOT be "empty" state.. - //if it IS the empty state, the tile clears itself + /** + * Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body. + * + * @method Phaser.Physics.Ninja.Tile#setType + * @param {number} id - The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. + */ setType: function (id) { if (id === Phaser.Physics.Ninja.Tile.EMPTY) @@ -91,7 +165,6 @@ Phaser.Physics.Ninja.Tile.prototype = { } else { - //set tile state to a non-emtpy value, and update it's edges and those of the neighbors this.id = id; this.updateType(); } @@ -100,6 +173,11 @@ Phaser.Physics.Ninja.Tile.prototype = { }, + /** + * Sets this tile to be empty. + * + * @method Phaser.Physics.Ninja.Tile#clear + */ clear: function () { this.id = Phaser.Physics.Ninja.Tile.EMPTY; @@ -107,28 +185,13 @@ Phaser.Physics.Ninja.Tile.prototype = { }, - render: function (context, key) { - - if (this.id === 0) - { - return; - } - - var image = this.system.game.cache.getImage(key); - var data = this.system.game.cache.getFrameData(key); - var frame = data._frames[this.id - 1]; - - context.drawImage(image, frame.x, frame.y, frame.width, frame.height, this.x, this.y, this.width, this.height); - - // context.beginPath(); - // context.strokeStyle = 'rgb(255,255,0)'; - // context.strokeRect(this.x, this.y, this.width, this.height); - // context.strokeRect(this.pos.x, this.pos.y, 2, 2); // center point - // context.closePath(); - - }, - - //this converts a tile from implicitly-defined (via id), to explicit (via properties) + /** + * This converts a tile from implicitly-defined (via id), to explicit (via properties). + * Don't call directly, instead of setType. + * + * @method Phaser.Physics.Ninja.Tile#updateType + * @private + */ updateType: function () { if (this.id === 0) @@ -567,7 +630,6 @@ Object.defineProperty(Phaser.Physics.Ninja.Tile.prototype, "right", { }); -// TILETYPE ENUMERATION Phaser.Physics.Ninja.Tile.EMPTY = 0; Phaser.Physics.Ninja.Tile.FULL = 1;//fullAABB tile Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn = 2;//45-degree triangle, whose normal is (+ve,-ve) @@ -603,7 +665,6 @@ Phaser.Physics.Ninja.Tile.HALFr = 31; Phaser.Physics.Ninja.Tile.HALFu = 32; Phaser.Physics.Ninja.Tile.HALFl = 33; -//collision shape "types" Phaser.Physics.Ninja.Tile.TYPE_EMPTY = 0; Phaser.Physics.Ninja.Tile.TYPE_FULL = 1; Phaser.Physics.Ninja.Tile.TYPE_45DEG = 2; diff --git a/src/physics/ninja/World.js b/src/physics/ninja/World.js index 34d951ec..0a10d537 100644 --- a/src/physics/ninja/World.js +++ b/src/physics/ninja/World.js @@ -7,8 +7,10 @@ /** * Ninja Physics constructor. * +* The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey. +* * @class Phaser.Physics.Ninja -* @classdesc Arcade Physics Constructor +* @classdesc Ninja Physics Constructor * @constructor * @param {Phaser.Game} game reference to the current game instance. */ @@ -83,7 +85,7 @@ Phaser.Physics.Ninja.prototype = { * * @method Phaser.Physics.Ninja#enableTile * @param {object|array} object - The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array. - * @param {number} radius - The radius of the Circle. + * @param {number} [id=1] - The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. */ enableTile: function (object, id) { @@ -131,14 +133,40 @@ Phaser.Physics.Ninja.prototype = { }, + /** + * Updates the size of this physics world. + * + * @method Phaser.Physics.Ninja#setBounds + * @param {number} x - Top left most corner of the world. + * @param {number} y - Top left most corner of the world. + * @param {number} width - New width of the world. Can never be smaller than the Game.width. + * @param {number} height - New height of the world. Can never be smaller than the Game.height. + */ + setBounds: function (x, y, width, height) { + + this.bounds.setTo(x, y, width, height); + + }, + + /** + * Updates the size of this physics world to match the size of the game world. + * + * @method Phaser.Physics.Ninja#setBoundsToWorld + */ + setBoundsToWorld: function () { + + this.bounds.setTo(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height); + + }, + /** * Called automatically by a Physics body, it updates all motion related values on the Body. * * @method Phaser.Physics.Ninja#updateMotion * @param {Phaser.Physics.Ninja.Body} The Body object to be updated. - */ update: function () { }, + */ /** * Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.