Jump to content

Fullscreen desktop resolution switching?


KyleNau
 Share

Recommended Posts

I have a client who wants an offline version of their game (as an .exe projector) that runs as a fullscreen application. I've wrapped it with node-webkit but fullscreen just stretches the window size leaving a small-ish game running inside a big black border. I could scale the canvas but then that would make everything blurry.

 

This is where I kind of miss Flash because there were a number of cheap tools to make a projector switch the desktop resolution to that of your game. Does anyone know of anything like this for HTML5?

Link to comment
Share on other sites

You could draw your game canvas scaled up on a bigger canvas that fits the screen.

That will keep the crisp edges.

 

http://www.photonstorm.com/phaser/pixel-perfect-scaling-a-phaser-game (The same method can be used for non phaser games)

 

But it will affect your performance if the output canvas is too big. 

And even then, if the game doesn't perfectly fit it will still leave borders or you will have to discard the aspect ratio.

 

Maybe the scaling decision should have been made before the game was coded. Aligning everything relative instead of fixed positions, using vector graphics, etc, just passing in the screensize and getting perfect scaled results.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...