mobicfly Posted July 23, 2017 Share Posted July 23, 2017 I am trying to use this lib: https://github.com/pixijs/pixi-tilemap and it seems using shader rather than sprites to render tilemap? is it more efficiency? why? the memory usage is the same, right? thanks. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 23, 2017 Share Posted July 23, 2017 It is used in RpgMaker MV. 1. Its like graphics but for sprites - if you dont clear it, it stays in STATIC buffer, instead of uploading DYNAMIC every frame. 0% of CPU usage when there're no changes. 2. It doesnt create sprite objects - no problem for javascript GC There are stupid restrictions on textures, right now it can work only with 16 base textures of 1024x1024 size. That came from RpgMaker MV, and so far no one complained about it - and I can change it to be more suited for your game. Algorithm of usage: 1. When you fill the tilemap, remember the rectangle area. 2. When user moves camera away from it - refill the tilemap. Tutor: https://github.com/Alan01252/pixi-tilemap-tutorial Quote Link to comment Share on other sites More sharing options...
mobicfly Posted July 24, 2017 Author Share Posted July 24, 2017 thanks for the clarification Ivan. those two benefits sound promising. I have read the source code and tutorial for a few days, trying to figure out the mechanism behinds it. and planning to migrate it to another game engine. and by the way, the lib you made is awesome, thanks for sharing to the community. ivan.popelyshev 1 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.