-
energyyzerLikes 0Problem Description
Hi, as cocos2d-x team are working activly on javascript branch of engine to be able create Web games it is quite strange that from start you can’t launch project on the WEB with proper look and sharpnes.
When you add Text labels in the game, they looks blurry. Can you please make tutorial: what should be adjusted in Cocos2d-x JS settings to make game look sharp(fonts) for WEB to make it production ready.
Blurry text example: https://www.dropbox.com/s/7437ck0int2798f/Screen%20Shot%202015-08-24%20at%2016.43.18.png?dl=0
-
Sonar Systems adminLikes 0
Could you send us a project for us to test out as that shouldn’t be the case
-
energyyzerLikes 0
Hi,
We created new project with simple Text line to test on Cocos2d-x JS 3.7.1:
Without Framewroks(346kb):
https://www.dropbox.com/s/drmb2ewn9bqm3e9/test_without_framework.zip?dl=0
Project with Frameworks(195mb)
https://www.dropbox.com/s/uf8br618z4qe5pj/testblurr.zip?dl=0
Blurry text pic from our Mac:
https://www.dropbox.com/s/bauxp2zh8c6gg18/Screen%20Shot%202015-08-25%20at%2015.21.53.png?dl=0
-
energyyzerLikes 0
Hello, have you checked code or what do you think regarding that issue?
-
Sonar Systems adminLikes 0
Figured out the issue, the resolution is too low
change it in the following files:
- index.html
- main.js
By default it is 800x450
It needs to be bigger, I tried 1920x1080 and it worked well.
-
energyyzerLikes 0
Hi I have changed
main.js:
cc.view.setDesignResolutionSize(1920, 1080, cc.ResolutionPolicy.SHOW_ALL);
Index.html:
canvas id="gameCanvas" width="1920" height="1080
But still text is blurry, are you sure that you see it crispy? You using retina display?
-
Sonar Systems adminLikes 0
Try 3840x2160
What are you running it on?
-
energyyzerLikes 0
I’m running on iMac Retina 5120x2880 ,
So i was trying to set 5120x2880 and 3840x2160 – still text looks blurry
https://www.dropbox.com/s/p0z4l3riu1jwxsy/Screen%20Shot%202015-08-27%20at%2010.43.12.png?dl=0
https://www.dropbox.com/s/6ds79gbm5dr0le5/Screen%20Shot%202015-08-27%20at%2010.44.30.png?dl=0
btw also test project from Cocos2d-x http://www.cocos2d-x.org/wiki/MoonWarriors_-_Cocos2d-JS_Showcase doesn’t look sharp in browser.
As understood there is some kind workaround like initialize lables with x4 size, like original size 20, make it 80 and then use setScale(0.25) then it looks more or less sharp, so it is quite strange for WEB framework to not cover that part.
-
Sonar Systems adminLikes 0
But retina imac isn’t a wide spread machine, as long as it runs well on others for now its ok
-
energyyzerLikes 0
We tested also on Macbook Pro 13 Retina and there is also same issue, can you please share you screenshot how text appears on your screen.
As we want deliver to user perfect games with perfect visuals we trying our best to solve that issue.
-
Sonar Systems adminLikes 0
Have you tried setting retina to false
cc.view.enableRetina(true);
in the main.js file
-
energyyzerLikes 0
With retina enabled and 3840x2160 it looks better, but still not perfect. other resolutions gives bigger blurr.
How then to launch game, like get max dispaly resolution and run it in that mode(but still text not perfect), but if i need to run in smaller window how to handle it.
What you think: is it global framework issue or our expectations is to high?:)
Would be interesting to see some other games developed for WEB using cocos2d-js to see if there is that issue or not.
-
Sonar Systems adminLikes 0
Most people don’t have screens with a resolution that high so perhaps Cocos2d-x just isn’t designed for it yet.
-
bpdubey87Likes 0
Hi All,
Is that font issue resolved in Cocos2d js? I am still getting the issue, text is not clear (LabelTTF). I have changed many fonts and also tried different resolution ratio. But no luck so far.
Plz Help!
-
Sonar Systems adminLikes 0
On desktop?
Login to reply