photonstorm
410cfd2d71
Code reformatting.
2014-08-29 18:06:01 +01:00
photonstorm
92386221e4
Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886 )
2014-08-29 18:03:32 +01:00
photonstorm
5546e5903c
Tiled polylines are now imported into the map objects property as well as map collision ( #1117 )
2014-08-29 16:56:30 +01:00
photonstorm
10e7d8ff7e
TilemapParser.getEmptyData now correct adds an empty bodies array into layers. This fixes an issue where p2 couldn't convert a csv map into collision tiles (thanks @sru #845 )
2014-08-29 16:30:29 +01:00
photonstorm
2d4d1a050d
Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859 )
2014-08-28 04:30:13 +01:00
Richard Davey
afb094a6eb
Merge pull request #1126 from beeglebug/feature/tile-properties
...
copy tile properties to tiles when parsing map
2014-08-28 01:35:20 +01:00
beeglebug
23f077a4e8
copy tile properties to tiles when parsing map
2014-08-21 21:08:05 +01:00
Alessandro Cuzzocrea
5e76eb4834
Added support for Tiled object's type field
2014-08-16 21:44:21 +02:00
photonstorm
9c1f39d284
jshint fix
2014-07-18 01:07:45 +01:00
photonstorm
49bb45c42e
Tilemap.swap now accurately swaps from A to B and from B to A (thanks @noidexe #1034 )
2014-07-18 00:29:24 +01:00
photonstorm
2293b64c94
Removing debug / console.log output.
2014-07-09 05:49:13 +01:00
sivael
cdaab269a0
Update Tilemap.js
2014-06-27 14:36:06 +02:00
sivael
7fb5c8cf5d
Update Tilemap.js
2014-06-27 14:25:56 +02:00
sivael
c7cae6ece7
Update Tilemap.js
2014-06-27 14:21:45 +02:00
sivael
05ce6f60a1
TileMap update performance
...
Discussion: http://www.html5gamedevs.com/topic/7409-tilemaps-changing/
It should remove the problem of updating stuff in a 100x100 tilemap making the engine recalculate every single update.(390 tiles changed in that map makes it a 100x100x390 loop.
Whould make the recalculate parameter in the setCollision functions unnecessary as well.
2014-06-27 14:10:11 +02:00
photonstorm
e923e230e0
TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851 )
...
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851 )
2014-06-11 00:15:02 +01:00
Richard Davey
fddd1e9f7a
Merge pull request #851 from jotson/dev
...
Render tilemap when camera outside of world bounds, layer wrapping
2014-06-11 00:05:23 +01:00
JeanDavidDaviet
a4b279b9cc
updated doc for Phaser.Tilemap#createBlankLayer
2014-06-04 19:01:10 +10:00
John Watson
14e1f0fcc6
Render tilemap when camera outside of world bounds, layer wrapping
...
Prior to this change, TilemapLayers always restricted themselves to
rendering strictly within the world bounds. If the camera was allowed
to go beyond the world bounds, then the tilemap would appear to stop
scrolling once the camera hit the world edge. This allows the tilemap
to continue scrolling, showing empty space beyond the edge of the map.
Additionally, when the new "wrap" parameter is true, the tilemap will
render its opposite edge in the empty space. This simulates the map as
if it was the surface of a toroid (donut) rather than a flat plane.
2014-05-27 14:51:44 -07:00
Simon Boyé
7e43248412
Fixed Tilemap.removeTile issue to put tile of index -1 instead of null.
2014-05-19 22:58:52 +02:00
photonstorm
cfadaf3e70
Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer)
2014-05-15 22:30:32 +01:00
photonstorm
1d13855abb
Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters.
2014-05-15 19:56:56 +01:00
Richard Davey
5770b654a6
Merge pull request #791 from tigermonkey/dev
...
[tilemap] parse polygon, ellipses and rectangles
2014-05-14 00:06:53 +01:00
Maximilian Mader
d7ba7b3a62
Improve TileMap's setCollsion functions
...
Now one can decide in 'setCollision', 'setCollisionBetween', 'setCollisionByExclusion' and 'setCollisionByIndex' to recalculate the collision faces or not.
I was able to decrease the time it takes to set the collisions from 1880ms to 440ms in my case,see http://www.html5gamedevs.com/topic/6328-camera-rendered-area-move-tilemaplayer/?p=38037
2014-05-12 17:42:54 +02:00
photonstorm
041bbd430c
Tilemap.getTile has a new nonNull parameter. If true it won't return null
for empty tiles, but will return the actual Tile in that location.
2014-05-07 01:30:48 +01:00
photonstorm
91f8f96a76
TilemapWalker allows you to set a location marker into a tilemap. You can then move around with commands such as moveForward, turnLeft, etc.
...
New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with the TileMapWalker Plugin.
2014-05-07 00:10:48 +01:00
Pablo Barbáchano
7f733a0b82
[tilemap] parse polygon, ellipses and rectangles
2014-05-01 13:13:53 +02:00
photonstorm
422e769a3e
Tilemap.createFromObjects will now force the creation of the property again even if it doesn't exist (regression fix from 2.0.4)
2014-05-01 11:42:15 +01:00
photonstorm
55dc748953
Tilemap.getTile and getTileXY used to return null
in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return null
again.
2014-04-29 21:28:14 +01:00
photonstorm
74108148ac
CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692 )
2014-04-28 23:21:57 +01:00
photonstorm
e9436293a8
Tilemap.addTilesetImage will now raise a console.warn if you specify an invalid tileset key and not create the tileset rather than pick the default set.
2014-04-28 13:47:27 +01:00
photonstorm
65022ccc55
Blank Tilemaps no longer create null
tiles, but instead create Tile objects with an index of -1 which can be replaced and updated like any other tile.
...
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:42:38 +01:00
photonstorm
b1153299c0
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:23:07 +01:00
photonstorm
1ef617ca82
Updated Tilemap.destroy documentation to clarify layer removal (issue #740 )
2014-04-28 01:39:45 +01:00
photonstorm
e9cb345261
P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
2014-04-14 13:52:53 +01:00
Raeven0
7fa9e4639e
correct Tilemap.hasTile(...) parameter typing
...
Member methods of Tilemap which take a layer parameter use getLayer on
that parameter to allow passing int, string, and TilemapLayer objects.
Tilemap.hasTile(...) should do so as well.
2014-04-01 20:26:16 -05:00
photonstorm
38d722c1e5
Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
...
Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
If you pass `null` to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
2014-04-01 13:36:42 +01:00
Christian Wesselhoeft
89a1639952
Fix jshint issues in src/tilemap
2014-03-25 14:56:04 -07:00
Christian Wesselhoeft
61f18b675c
Trim trailing whitespace.
2014-03-25 14:56:04 -07:00
photonstorm
26a89f0b84
New build files with tilemap callback fixes in.
2014-03-24 01:39:09 +00:00
photonstorm
49bcd2edd2
Tilemap fixes.
2014-03-24 00:30:05 +00:00
photonstorm
e1c98ba617
You can now create multiple blank layers in a Tilemap.
2014-03-23 23:58:01 +00:00
Richard Davey
eddf1edead
Tilemap updates
2014-03-23 10:35:31 +00:00
photonstorm
539d70d581
Testing multi layer blank map updates.
2014-03-22 08:33:38 +00:00
photonstorm
0fa54b0b24
TileSprites now emit outOfBounds and enterBounds events accordingly.
...
TileSprites working with physics bodies again.
2014-03-21 18:04:24 +00:00
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