Commit graph

62 commits

Author SHA1 Message Date
photonstorm
46d5069110 Tilemap.createFromObjects has a new parameter: adjustY, which is true by default. Because Tiled uses a bottom-left coordinate system Phaser used to set the Sprite anchor to 0,1 to compensate. If adjustY is true it now reduces the y value by the object height instead. 2014-03-17 23:54:04 +00:00
photonstorm
90ef694347 Tilemap.createFromObjects used to set the Sprite anchor to 0,1 because Tiled uses a bottom-left coordinate system. It now calculates the offset in TilemapParser. 2014-03-17 23:27:13 +00:00
photonstorm
30a04985f7 Working through blank tilemap fix. 2014-03-17 16:10:19 +00:00
photonstorm
b9ac0d565e Fixed Tile callback check in Arcade Physics (fix #562) 2014-03-16 00:53:50 +00:00
photonstorm
0e29bd4300 Tile Collision Callbacks working properly. CSV / Blank map examples added. Multiple tilesets per map working again. That's it folks! 2014-03-14 04:21:56 +00:00
photonstorm
f3ff9c197f Fixed all the tilemap examples. 2014-03-14 03:26:06 +00:00
photonstorm
e955145707 Added p2 kill and reset test + nearing completion on tilemap collision. 2014-03-13 21:14:18 +00:00
photonstorm
c8e63582a4 Lots of small tweaks to pass jshint. 2014-03-13 16:49:52 +00:00
Dan Cox
3b7039ad32 Documentation change: swap for swapTile
In both Phaser 1.1.6 and 1.2, it says "swapTile" when it means "swap".
2014-03-11 23:56:12 -04:00
Dan Cox
5fcc8db8a4 Tilemap.swap() called twice should not flip values
Repeat calls to swap() should not affect index values a second time.
"swap(1,2); swap(1,2)" should not be the same as "swap(2,1)."

(This also affects Phaser 1.1.6.)
2014-03-11 23:41:37 -04:00
photonstorm
58887d9bc6 Moved all of the Tilemap to P2 body methods into P2 itself (makes more sense this way) and tidied them up. 2014-03-11 15:02:59 +00:00
photonstorm
1c68ff9042 Tilemap.createFromObjects allows you to specify you own object type to be created if you want a class that extends Phaser.Sprite. 2014-03-07 03:19:07 +00:00
photonstorm
5a6ae5f696 Tilemap.putTile now correctly re-calculates the collision data based on the new collideIndexes array (fixes #371)
Tilemap.putTile can now insert a tile into a null/blank area of the map (before it could only replace existing tiles)
2014-03-04 03:08:35 +00:00
photonstorm
4a370c82cf You can now load in CSV Tilemaps again and they get created properly (fixes #391)
You can now create blank Tilemaps and then populate them with data later.
2014-03-03 13:45:47 +00:00
photonstorm
d8f5832fa2 Completely empty Tilemaps can now be created. This allows for dynamic map generation at runtime.
Loads of updates across most the Tilemap files. Not finished yet, still CSV loading to do and a multi-tileset issue to resolve, but it's a lot more flexible now.
2014-03-03 05:19:46 +00:00
photonstorm
34ee2b0b20 Fixed issue with CocoonJS detection in Device.
Fixed docs issue in Tilemap.
Created landscape pointer test, confirmed working fine (issue #276)
2014-02-28 03:09:04 +00:00
Jonas Malm
276ef9c268 Method expects body
Fixes crash in map.generateCollisionData
2014-02-23 17:42:39 +01:00
photonstorm
5d5c64d22f Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.
After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.
Debug.renderPhysicsBody updated to take camera location and body rotation into account.
Body movement functions put back to velocity :)
Updated to latest dev version of pixi and latest p2.js
Updated docs
2014-02-18 03:01:51 +00:00
photonstorm
ee3f6d8e7f Tilemap had the wrong @method signatures so most were missing from the docs. 2014-02-08 07:24:40 +00:00
photonstorm
0896c2fac7 Updating copyright year and README. 2014-02-05 16:54:59 +00:00
photonstorm
651858372c Added Game core loop stepping support. Super-useful for debugging, and helped me track down the issue with jittery physics collision. Double-win! 2014-01-29 17:10:13 +00:00
photonstorm
bd66be1804 Updated Tilemap classes and further tests. 2014-01-14 22:34:41 +00:00
photonstorm
ff7cad102c All of the setCollision methods now have a 'collides' parameter so you can enable or disable collision, not only enable it. Also fixed Loader example. 2014-01-14 11:58:00 +00:00
jcs
ab02040bea fix Tilemap.putTile 2014-01-13 20:18:08 -08:00
Richard Davey
17af96d46a Merge pull request #306 from jcd-as/dev
fix Tilemap.setCollision
2014-01-13 17:19:25 -08:00
jcs
befcf74f44 fix Tilemap.setCollision 2014-01-13 16:46:29 -08:00
photonstorm
e7c2b6ae9c Fixed nearly all of the tilemap examples to use the new tilemap system. 2014-01-14 00:31:58 +00:00
photonstorm
ce4cf531d4 Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source. 2013-12-30 16:54:00 +00:00
photonstorm
0acef49a7c RenderTexture now displays correctly in Canvas games.
Stage.display property added. A direct reference to the root Pixi Stage object (very useful for RenderTexture manipulation)
2013-12-23 04:20:09 +00:00
photonstorm
bf72b4d3b0 Tilemap.createFromObjects can now turn a bunch of Tiled objects into Sprites in one single call, and copies across all properties as well. 2013-12-22 04:27:12 +00:00
photonstorm
352749e803 Collision commands in and working. Updated sci-fly example. Multiple layers rendering. Mixed tile size on one layer rendering, but collision is grid bound. 2013-12-19 05:09:49 +00:00
photonstorm
4c7a4ebf62 Tiled map loader now working much better, rendering, layering properly. 2013-12-19 03:49:28 +00:00
photonstorm
5cf7ed4fdb More TypeScript updates. 2013-12-18 16:56:14 +00:00
photonstorm
f991f9cee8 Tweens have a new event: onLoop.
Tweens - Example showing how to use the tween events, onStart, onLoop and onComplete.
Lots of documentation fixes in the Tween class.
Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite)
Tween.onStart is now called when the tween starts AFTER the delay value, if given (thanks stevenbouma)
2013-12-18 13:02:01 +00:00
photonstorm
b2c680811b New unified Tiled loader. 2013-12-18 13:02:01 +00:00
photonstorm
896e9af9f5 TilemapLayers now render tiles correctly, with our without debugging overlay. Collision working well across single and index ranges. 2013-12-17 05:07:00 +00:00
photonstorm
669570c701 Tidying up the examples and more Tilemap work. 2013-12-10 12:23:42 +00:00
photonstorm
ea3802a556 Lots of new tilemap code in here. If your game relies on tilemaps then please don't update to this commit unless you want to help debugging! 2013-12-05 18:12:16 +00:00
Josh Shepard (jcs)
539dcdd18a move 'dirty' flag for Tilemap to a per-layer flag. Fixes #242 2013-12-04 09:42:25 -08:00
photonstorm
a9a46bfbbf Lots of documentation updates and new Loader examples. 2013-11-27 16:33:49 +00:00
photonstorm
299115ca5d The entire Phaser library has been updated to match the new JSHint configuration. 2013-11-25 04:40:04 +00:00
Izzimach
18a07f7a88 Switched Tilemap to use user-specified layer.
Tilemap was using the current layer even if a layer was specified as a
parameter in getTile/setTile. Changed it to use the user layer if one is
specified.
2013-11-08 11:40:07 -07:00
photonstorm
7e8b79adf4 Tilemap painting example and other smaller updates. 2013-10-17 21:10:00 +01:00
photonstorm
4b2ac6c6c6 More tilemap examples 2013-10-16 21:25:51 +01:00
photonstorm
31018b9295 Star Struck game back and working again, plus finished the level design. 2013-10-16 03:37:15 +01:00
photonstorm
f3ea68aad3 Extracting the correct area from a layer, debug displaying it and preparing for collision. 2013-10-15 05:41:42 +01:00
photonstorm
0201baef11 And Tilemaps are rendering again - and much better than ever before :) Just one final optimisation pass to do and then it's on to collision. 2013-10-11 18:18:27 +01:00
photonstorm
ebc4e5dc3d New examples HTML page added. 2013-10-08 12:52:20 +01:00
photonstorm
fa692653e3 Final commit before rebuilding the Tilemap system. 2013-10-08 10:52:15 +01:00
photonstorm
c307f79102 Added Sprite.fixedToCamera, fixed Angular Velocity and Acceleration, fixed jittery Camera, added skipQuadTree flag and created lots more examples. 2013-10-08 00:58:20 +01:00