Benoit Posted February 26, 2017 Share Posted February 26, 2017 Hello Pixi Developers and Users I would like first to present myself as a newcomer on the forum Im the developer of Sprite Basic Compiler Game Engine (https://spritebasic.com) It is cloud-based game framework with Basic Scripts tha uses PixiJS as web gl renderer as long as PhysicsJS as physic engine and other librairies needed to create games like the great Kittykatattack libraries For a demo and future game i wish to write, i would like to create a tilingsprite, for an endless scrolling background, made of an array of textures What would be the best strategy to concatenate an array of textures, that might be of different dimensions, into a large tiling sprite, either in portrait or landscape. Would create a large tiling sprite make performances suffer or the part of the tiling sprite that is not currently displayed would be correctly cropped from screen display/calculations? Many thanks if you can light me on this specific Benoit Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 26, 2017 Share Posted February 26, 2017 You have to put TilingSprite on whole screen and change its tilePosition/tileScale. The only thing that will limit you is the number of pixels drawn, not the number of texels. Make a demo and we'll see how to improve it. Quote Link to comment Share on other sites More sharing options...
Benoit Posted February 26, 2017 Author Share Posted February 26, 2017 Thanks for your reply Ivan The thing is that i want to instantiate the tiling sprite, not from a single texture but from an array of textures. I have 10 of them, that i want to use to make a large tiling sprite where only 1/10th of it would be drawn at the same time It seems i can only instantiate a tiling sprite from a single texture how can i make a single large texture from 10 textures? When you say that only the pixels drawn counts, not the texels, it means that only part of the large texture displayed on screen will have to be processed by the renderer? What is a texel btw? I will for sure post a demo when i'll have succeded in making on tiling sprite from an array of textures Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 26, 2017 Share Posted February 26, 2017 I don't understand what do you want to do, at all. Make some pics? Quote Link to comment Share on other sites More sharing options...
Benoit Posted February 26, 2017 Author Share Posted February 26, 2017 texture 1+ texture 2+ ..... + texture 10 = 1 Large Tiling Sprite each texture is 1400*800 . Tiling Sprite made of ten different textures would be 14000*800 thanks! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 26, 2017 Share Posted February 26, 2017 Then its better to use multiple sprites and move them from left to right as player goes forward. Quote Link to comment Share on other sites More sharing options...
Benoit Posted February 26, 2017 Author Share Posted February 26, 2017 ok, thanks for the advice... 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.