agar.io-clone
agar.io-clone copied to clipboard
CTRL + and -
Please add the feature to not be able to use CTRL + and - because its not fair when people can see the entire map and where people are.
No it is fair because everyone can do it and if you do use it your client game fps drops dramatically and lags so you are likely to get kicked for 5000 heartbeat.
yeah but to be safe because what if someone has a amazing pc and can be able to see entire map without fps drops? I'm just saying think it gives some people unfair advantages and you shouldn't be able to do that like in the real agario since were trying to make this is a clone of the real game
Actually, I have used this and with my pc I have no issues zooming out without having lag, Which gives me a major unfair advantage over other users. :P A way to block this would be nice and I have tested several methods to prevent this without success.
I agree that this should be addressed because it does have gameplay impact among all players, not just the one zooming out. Agar.io is probably just watching keypress and resetting your zoom back to a set variable (Percentage based off mass). You can tell if you hold CTRL -
in Agar.io it starts to lag client side trying to process.
Preventing brownser zoom seems not very hard as google research yields a lot of results regarding this.
The brownser zoom is extremely laggy for most people and I think too it shouldnt be used as zoom feature . (+ it alter the whole brownser and the ui) Especially because implementing a zoom is extremely easy (actually I spent a lot of time on this simple issue) .
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). Then you just apply the zoom factor after global.screenWidth/height and global.gameWidth/height to the position of every entities that is drawn .
also here (t get all the data from the server : socket.emit('windowResized', { screenWidth: global.screenWidth* coef_zoom, screenHeight: global.screenHeight* coef_zoom });
Thats it, you have a nice, totally modifiable zoom feature.
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). Then you just apply the zoom factor after global.screenWidth/height and global.gameWidth/height to the position of every entities that is drawn .
also here (to get all the data from the server : socket.emit('windowResized', { screenWidth: global.screenWidth* coef_zoom, screenHeight: global.screenHeight* coef_zoom });
I'm trying to follow this @geopi but I'm having a bit of trouble as a newb. Could you be as clear as possible?