rich Posted March 6, 2014 Share Posted March 6, 2014 http://labs.phaser.io/view.php?f=012+ninja+physics.js drhayes and jerev 2 Link to comment Share on other sites More sharing options...
markware Posted March 6, 2014 Share Posted March 6, 2014 This is AWESOME!!! Link to comment Share on other sites More sharing options...
valueerror Posted March 6, 2014 Share Posted March 6, 2014 wow! love it! Link to comment Share on other sites More sharing options...
alex_h Posted March 6, 2014 Share Posted March 6, 2014 Very nice! Link to comment Share on other sites More sharing options...
jerev Posted March 6, 2014 Share Posted March 6, 2014 About time! Very cool, but it doesn't beam the font wobble. Link to comment Share on other sites More sharing options...
prtksxna Posted March 6, 2014 Share Posted March 6, 2014 Really cool! I initially got confused with what the up arrow key was doing Link to comment Share on other sites More sharing options...
jpdev Posted March 6, 2014 Share Posted March 6, 2014 This seem to use another physics system? ("ninja"?)So how will this integrate with the rest? (materials etc.) question in more detail here (not by me, but that's exactly what I am wondering) ps: many other lab demos seem broken (cannon balls breaks on initialization for example, same for boxes) Link to comment Share on other sites More sharing options...
directcode Posted March 6, 2014 Share Posted March 6, 2014 Cool! Link to comment Share on other sites More sharing options...
rich Posted March 6, 2014 Author Share Posted March 6, 2014 I'll fix the other labs demos now, they all need p2 starting. Also this for how physics systems work in phaser: http://www.html5gamedevs.com/topic/4518-explaining-phaser-2s-multiple-physics-systems/ jpdev 1 Link to comment Share on other sites More sharing options...
clark Posted March 6, 2014 Share Posted March 6, 2014 Amazing stuff, I was looking at Tiles for the first time lastnight I wondered how physics would work. Then I see this! Good work! Link to comment Share on other sites More sharing options...
drhayes Posted March 7, 2014 Share Posted March 7, 2014 Awesome! I can't wait for sloping tile support. One question: how are the slope shapes determined? Looking in the level JSON I don't see any geometry defined... is it picking it up from the pixel data or the tile graphics? Link to comment Share on other sites More sharing options...
valueerror Posted March 7, 2014 Share Posted March 7, 2014 In a first test it looks like its picking up some pixel data because the used collission borders on complex graphics with more than one exact colorchange ist totally off.. sometimes my player walks inside the tiles on another visible border.. Link to comment Share on other sites More sharing options...
rich Posted March 8, 2014 Author Share Posted March 8, 2014 It's nothing to do with pixel data at all, each type of slope has an ID. There are 34 in total. The json file the demo uses is just the sprite sheet used for rendering loaded into Tiled and exported.Note that lots of tile types MUST be square, if they're not you'll get weird collisions happening. See ninja / Tile,js for the id to slope mappings at the bottom of the file, or look in the resources folder and you'll see the tiles as pngs. Link to comment Share on other sites More sharing options...
drhayes Posted March 8, 2014 Share Posted March 8, 2014 Just to make sure I understand: 1. You made a tilemap in Tiled using the debug tilemap image as the layer image. Exported it to JSON.2. The N+ifying happened in this line: game.physics.ninja.enableTile(tile, tile.frame);3. You just happened to use the tile's spritesheet frame as the ID, but we can set that however we need to for our maps (e.g. 5 completely solid tiles followed by twenty-seven different concave, whatever). Very cool. I dig. Equal width and height sound like no big limitation to me if this is what I get. ( = Can you explain what the suffixes mean in the tile definitions at the bottom of ninja/Tile.js? "p", "n", "S", "B", etc? I'm assuming "drul" => down right up left, but for the rest I had to manually look it up by referencing the images. Link to comment Share on other sites More sharing options...
Recommended Posts