Commit graph

15 commits

Author SHA1 Message Date
Skysteed
5cd60b3378 Major Optimization for Tilemap Collision Indexing
This update optimizes an existing feature (Tilemap Collision Indexing).

This optimization will apply to [nearly] everyone using procedural generation tilemaps, infinite tilemaps, multiplayer tilemaps, particularly large tilemaps (especially those dyanmic in nature) or who otherwise intend to index collisions before the tiles are loaded.

Benchmarking:

Using the standard approach, indexing collisions for a 500x450 tileset took 2530ms. By pre-building the collision index array in its entirety, I was able to reduce that to 259ms. However, this implementation reduces it to 8 ms. Larger tilemaps would be exponentially affected.

There are some considerations to make here since there are better implementations, but it would require deprecating some existing code. The advantage would be that the standard approach itself would be optimized, (thus avoiding the sort of 2500+ms costs here), rather than fairly obscured as it is with this implementation.
2018-07-19 10:59:35 -05:00
tarsupin
6613bc28e9
Fixing removeTileAt, removeTileAtWorldXY docs
The 'tile' parameter was not included in the actual code, so it's removed here from the documentation.
2018-06-30 15:09:41 -05:00
Andre van Tonder
32ff6df5b3 fixed JsDoc for Phaser.Tilemaps.Tilemap#createBlankDynamicLayer
x, y, width, height, tileWidth, tileHeight are all optional params

I also add x, y params to jsdoc  as they were missing
2018-06-27 10:33:35 +08:00
Richard Davey
32ce8d7947 jsdoc fixes and removed un-used ResetKey file. 2018-04-19 12:30:38 +01:00
Richard Davey
28e2764723 More jsdoc fixes 2018-04-16 16:02:27 +01:00
Richard Davey
a2535d4597 jsdoc fix 2018-04-03 17:30:15 +01:00
orblazer
9375bb0530 Fix multiple types on Tilemaps 2018-03-20 16:11:33 +01:00
orblazer
30f410d1d3 Fix types in Tilemaps 2018-03-20 12:36:35 +01:00
Richard Davey
d1f5f8a82b Added jsdocs 2018-02-12 16:01:21 +00:00
Richard Davey
5dffe21858 Updated jsdocs 2018-02-07 23:27:01 +00:00
Richard Davey
67f13e30f9 Updated jsdocs 2018-02-07 23:12:55 +00:00
Richard Davey
6d58f92cd9 Updated jsdocs 2018-02-07 23:08:37 +00:00
Richard Davey
fb42cbee42 Updated jsdocs 2018-02-07 22:46:07 +00:00
Richard Davey
10193c181a Fixed require paths. 2018-02-07 17:10:01 +00:00
Richard Davey
89fe7123e1 Moved to its own top-level folder. 2018-02-07 16:29:48 +00:00
Renamed from src/gameobjects/tilemap/Tilemap.js (Browse further)