Hi,
We now trying to polish web version of the game made using cocos2d-x 3.7.1 JS version.
And we can not make it look smooth in browser, as rendered fonts looks blurry.
Is there best practices to make it work properly? (retina enabled: true, setResolutionPolicy)…
There you can see how blurry font we getting using following main.js configuration
cc.game.onStart = function(){
if(!cc.sys.isNative && document.getElementById("cocosLoading")) //If referenced loading.js, please remove it
document.body.removeChild(document.getElementById("cocosLoading"));
// Pass true to enable retina display, disabled by default to improve performance
cc.view.enableRetina(true);
// Adjust viewport meta
cc.view.adjustViewPort(true);
// Setup the resolution policy and design resolution size
//var resPolicy = new cc.ResolutionPolicy(cc.ContainerStrategy.FIXED_WIDTH, cc.ContainerStrategy.FIXED_HEIGHT);
//var policy = new cc.ResolutionPolicy(cc.ContainerStrategy.PROPORTION_TO_FRAME);
var policy = new cc.ResolutionPolicy(cc.ContainerStrategy.PROPORTION_TO_FRAME, cc.ContentStrategy.EXACT_FIT);
cc.view.setDesignResolutionSize(420, 667,policy);
// The game will be resized when browser size change
cc.view.resizeWithBrowserSize(true);
//load resources
cc.LoaderScene.preload(g_resources, function () {
cc.director.runScene(new GameScene());
}, this);
};
cc.game.run();