-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zooming out and in players feature request #426
Comments
Could you give more details? |
@abalabahaha Apperantly, he wants to have a feature to be able to zoom in and zoom out. |
Even proportional to the player |
Here a copy paste of my reply in 2 other similar 'issues' regarding this : You basically just need to put a graph.setTransform(x, 0, 0, x, 0, 0); inside the app.js file in the gameloop function and just after graph.fillRect(0, 0, global.screenWidth * zoomfactor , global.screenHeight * zoomfactor ); Note the zoom factor variable (actually it should be called dezoom factor). also here (to get all the data from the server : socket.emit('windowResized', { screenWidth: global.screenWidth* coef_zoom, screenHeight: global.screenHeight* coef_zoom }); careful though because of the game architecture, sending many visible entities uses a lot of bandwith and you ll need to optimize the amount of data sent (there is a lot of optimization possible) , unless of course you make a predictive client side. |
How add zooming in this? HELP
The text was updated successfully, but these errors were encountered: