englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.
MIT License
290 stars 31 forks source link

breaking changes with phaser v2.6.0 #69

Closed eugenioclrc closed 7 years ago

eugenioclrc commented 8 years ago

The method; game.cache.getPixiBaseTexture

It was deprecated and now it has been removed.

Its used on; https://github.com/englercj/phaser-tiled/blob/d27c4a331cb7f7ff30c1f33452ed26f67b8d3d20/src/tiled/Tileset.js#L32

englercj commented 8 years ago

This library hasn't been updated for anything past 2.4.0:

https://github.com/englercj/phaser-tiled/blob/master/package.json#L51-L53

Weedshaker commented 8 years ago

quite a list of phasers custom pixi changes: http://phaser.io/download/release/2.6.0

Weedshaker commented 8 years ago

just wanted to mention, that 2.5.0 has been working with phaser-tiled, since there hasn't been any pixi related changes from 2.4.o till 2.6.0

Weedshaker commented 8 years ago

fyi, I just compared the tilemap performance of 2.6.0 vs. 2.5.0 vs. 2.5.0 with phaser-tiled and I must say this extension is still much faster than the default tilemap rendering. Hope we get a new phaser-tiled release! THX for your effort!

photonstorm commented 8 years ago

A better comparison would be this branch: https://github.com/photonstorm/phaser/tree/webgl-tilemap

englercj commented 8 years ago

Aye, once the shader-based implementation for WebGL is ready this plugin is moot (which is why I haven't worked on it much lately)

Weedshaker commented 7 years ago

except for Canvas...

englercj commented 7 years ago

@Weedshaker Is this library faster cor canvas? I haven't really tested it much.

Weedshaker commented 7 years ago

@eugenioclrc Yes, it is far faster with phaser-tiled. Your debug plugin shows nearly no pink (rendering time) with this extension, while it has a fat block of pink without. I guess Canvas is still quite important for html game dev's... I just like the fallback option.

Weedshaker commented 7 years ago

Just gave it a shot with the new v2.7.0 Beta 4 comparing against v2.5.0 with phaser-tiled.

WebGL => approx. the same speed (Phaser Debug shows for renderer around the same ms) Canvas => v2.7.0 has still huge renderer times as expected, since the latest update only fixes WebGL

For now, I am going to stay with Phaser v2.5.0 and phaser-tiled. (@englercj) Until ether we get an update of phaser-tiled, (@photonstorm) Phaser fixes the tilemap rendering issues with Canvas itself or somebody convinces me to drop the Canvas support after all.

Anyways, thank you for your great effort on this plugin.

fkrauthan commented 7 years ago

So are there any news in making this plugin compatible with phaser 2.6?

englercj commented 7 years ago

I'm under the impression that @photonstorm is improving the core lib to where this plugin is no longer needed. Because of that, I don't want to spend the time upgrading it just to throw it away soon.

photonstorm commented 7 years ago

I doubt much would need to be changed to get it working with 2.6 anyway? It's not like there is a whole lot of code to the plugin. I don't have time to look myself though.

Edit: Sorry, to clarify I think anyone should be able to patch it up, not that @englercj should!

hexus commented 7 years ago

I've just started trying to integrate this with a game I'm working on and I've run into this issue.

I'm tempted to look into this myself and fix it for the immediate performance gain at high resolutions, rather than wait for the WebGL implementation.

I'll make a pull request if I get anywhere. :)

besserwisser commented 7 years ago

I have the same issue with Phaser CE 2.7 now. I can't downgrade to 2.5. When I downgrade to Phaser 2.5, I get other errors like "this.map.createLayer is not a function". Is there already a solution?

Weedshaker commented 7 years ago

WebGL, this lib mainly improves tilemaps for canvas. Just go WebGL only, since it seems to have been abondend.

besserwisser commented 7 years ago

@Weedshaker , thank you for pointing this out! I somehow missed this. Scrolling through large Tilemaps is still very laggy with Phasers WegGL compared to other frameworks. On Safari it is not playable at all on the newst MacBook Pro.

Weedshaker commented 7 years ago

@besserwisser , probably I don't know it better ;-) but I have had the same issues and in my point of view, it's making sense to lock your audience down to some browsers. It really depends, if its like an advert. game, which should run on all platforms or a full html5 game. For the later you can tell your visitors to use chrome. You got that on all computers and android, ios. Large tilemaps run good with Phaser WebGL and Chrome.

Since, you are using Phaser-CE, have you checked this out: http://phaser.io/tutorials/advanced-rendering-tutorial => http://phaser.io/tutorials/advanced-rendering-tutorial/part3

Add your main spritesheets with the Tilemap pictures into game.renderer.setTexturePriority to batch their rendering. Does this give you any improvements???

englercj commented 7 years ago

I haven't abandoned this module, I just have many OSS projects to maintain and this one is not high on the list. I'm always open to PRs if people want to fix the issues they are having.

I also need to rewrite the webgl portion to be shader-based and not sprite-based; again PRs are welcome.

photonstorm commented 7 years ago

Just to say I've issued a PR that fixes this plugin so it now works with Phaser beyond 2.4 and Phaser CE as well #75

englercj commented 7 years ago

Merged and released, hopefully this fixes things up. Thanks @photonstorm.