How to make my game render in the correct resolution size?
mandre96

I just downsized my game and when I run from the browser it keeps streching it and pixelizing the game.It is possible to prevent it from happening, so the game really shows at the correct resolution with screen black tapes?

 

Thanks in advance.

All 4 Comments
Gio

I assume you have set both minScreenSize and maxScreenSize. In that case, you could use wade.setWindowMode('none');

That will stop resizing your game to fit the screen. However I  would not recommend it. I think you want to resize the game if your screen is smaller than the game area, is that right? If so, set a minScreenSize to match the game area, but leave the maxScreenSize at 1920x1080 (the default value), or larger.

mandre96

I setted to disable window mode after the init() function and the game still streches.Yeah i want to strech to an maximun of 1024x768 since its a mobile game.

Gio

Just so I understand... your game area is 1024x768, and if there is more space you don't want the game to be stretched, but you want just some empty black space around it. However if there is less space, you want the game to shrink so it fits in the current screen size.

If that's correct, you want:

minScreenSize: 1024x768

maxScreenSize: 1920x1080 (or some higher values - I'd keep it like this because I'd want it to stretch on 4k monitors, but that's up to you).

mandre96

Gio,For some strange reason, today when I opened the game it worked.Thanks again. 

Post a reply
Add Attachment
Submit Reply
Login to Reply