Jump to content
Sign in to follow this  
ptaczek

Browser version 1.2.8 doesn't scale on Chrome

Recommended Posts

The online/browser version 1.2.8 on play.spellsofgenesis.com keeps the same smallish resolution regardless of the browser window size. Chrome 61.0.3163.100 (Official Build) (64-bit), macOS Sierra. I haven't tested other browsers.

Share this post


Link to post
Share on other sites

Hello @ptaczek

I was just about to update the forum message about the new version.

I also see this difference, but for me I prefer this one (this is only my player feeling). Could you please let me know your browser version, because I am not sure this is the same for everyone (Chrome, Firefox etc). Did you also try to refresh the cache by clicking on CTRL + F5?

Thanks for your report, I look forward to hearing from you :)

Note : I just merge your 2 posts.

Share this post


Link to post
Share on other sites

Hi eds_Yzia,

browser is Chrome 61.0.3163.100 (Official Build) (64-bit), macOS Sierra. And I tried to dump (bypass) the cache, I tried anonymous window. Also theres no error in the console, just one warning about game data deserialization and then tons of info messages from unity engine. Looks like a debug build to me. But who knows. 

Share this post


Link to post
Share on other sites

And I can see what's the problem:

The canvas element that holds the game drawing is <canvas id="#canvas" ...> but it should have id="canvas" without the #. The setFullscreen() and resizeChild() functions look for the canvas element by it's id using jquery $('#canvas') but the # in the jquery selector means 'look for ID canvas. So just remove the # in the <canvas> element id and you'll be fine.

Regards,
ptaczek

 

update: well, the 50% centering also causes problems with the canvas fitting the window height. So yes, the main problem is the #canvas id but more work is needed to make it nice. But maybe the scaling is disabled on purpose.

Edited by ptaczek
  • Thanks 1

Share this post


Link to post
Share on other sites

For those of you who'd like to have the maximization of the game window back, I've created a Tampermonkey script which does just that: resizes the playfield to fit the browser's window height. You'll need a Tampermonkey extension for your browser (all major browsers are supported) and then install my script.

Update: I have put the script on greasyfork.org for better transparency and easy installation. You can find it here.

 

Edited by ptaczek
updated download location
  • Thanks 1

Share this post


Link to post
Share on other sites

btw: the browser version throws this error after the match:

Can't request ad because fyber is not initialized.
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
FyberService:RequestAd(Action)
SoG.Game:RequestAdAndAddWaiter()
SoG.<LoadNextWave>c__Iterator1:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

 

Share this post


Link to post
Share on other sites

Hellow fellows ! 

I patched the js with @ptaczek's code. It works as a charm. I added his name to the code's comments and pushed it to production.

 

Thanks a lot to @ptaczek for his work !

 

<3

 

(simon from the dev team in case you don't know me :-) )

  • Like 1

Share this post


Link to post
Share on other sites
On 27/11/2017 at 11:46 AM, Simon said:

Hellow fellows ! 

I patched the js with @ptaczek's code. It works as a charm. I added his name to the code's comments and pushed it to production.

Thanks a lot to @ptaczek for his work !

<3

(simon from the dev team in case you don't know me :-) )

YW and nice to meet you, Simon ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×