kutas Posted April 11, 2021 Share Posted April 11, 2021 Im trying to wrap my brain around the internals of game like surviv.io. As i know it uses pixi.js for rendering. The whole map is enormous with many players doing their things in diffrent parts of it. How does it even work and renders so smoothly? How do I achieve similar effect in pixi? Let's say i want to put big game world into one container and control my player on only small rectangle of it while something is happening (monsters spawning etc) on other parts of game world? Could you please give some ideas, tutorials about it? The general idea i thought about is: Store coordinates of all the monsters , items, interactable objects in their JS objects, add them all to the game container when i create it and render them on screen only when player gets a few pixels near them. and redraw whole viewport area after each character step So basically draw things that are only few pixels away from player but still make them work outside of the render screen (changing their positions etc). Is it proper path to follow? Still cant wrap my head around getting lets say 10000x10000x map into the game and display only chunk 800x600 of it Quote Link to comment Share on other sites More sharing options...
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.