dimumurray Posted November 30, 2015 Share Posted November 30, 2015 So I have a tile map I need to generate that is 1920px by 38400px in size. Huge I know. The tileset I'm using to generate it is considerably smaller with 42 tiles where each tile has dimensions 40px X 40px.Naturally only a portion of the tile map will be visible at any time so my plan is to generate chunks of the tilemap on the fly that I can pan/zoom/scroll over. So far I've created the tile map using Tiled, exporting the map data as JSON. I've also created a separate JSON following TexturePacker's format so I can load the tileset into PixiJS. My next step is to take regions of the map data and draw them to a texture (or two for double buffering), redrawing/updating said texture every time the user pans/scrolls into a new region.I'm not sure if this is the best way to go about it though. Anyone have any experience with this scenario? Quote Link to comment Share on other sites More sharing options...
mattstyles Posted November 30, 2015 Share Posted November 30, 2015 I've gone the opposite way about it and re-used tiles going out of view by moving them and changing their appearance so that they become the tiles coming into view as you move around. It was done (quite a long time ago now!) in DOM but performance was fine, even for mobiles (old phones now). I can only imagine canvas would be far faster at doing this sort of thing. I'm not suggesting it is a better implementation, just a different one. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 30, 2015 Share Posted November 30, 2015 You arent' first Gigantic tilemap, (tiles 32x32) in production for 4 years: https://gameofbombs.com https://github.com/ivanpopelyshev/bombermine-shuffle https://github.com/ivanpopelyshev/pixi-tilemap : RPGMaker tiles, no chunks but that implementation is very fast, it uses shaders. I'll improve canvas fallback and it will be canonic lib for pixijs It doesnt depend on your map format, its like a super-effective ParticleContainer. I can help you to adjust pixi-tilemap for your project UPD. i need to add Tiled to list of supported tilemaps anyway. Lets work together? Quote Link to comment Share on other sites More sharing options...
mattstyles Posted December 1, 2015 Share Posted December 1, 2015 I hope you take Ivan up on the offer, it would be great to see pixi-tilemap get some more projects under its belt! I cant wait to start something new to give it a spin. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.