kaboom icon indicating copy to clipboard operation
kaboom copied to clipboard

Resize of game for different resolutions does not work.

Open ShubhenduVaid opened this issue 4 years ago • 3 comments

Link to my repo https://github.com/ShubhenduVaid/simple-game

ShubhenduVaid avatar Sep 04 '21 09:09 ShubhenduVaid

https://user-images.githubusercontent.com/9929523/132100948-cc2fe80f-3c80-4979-9764-bd24476bb0cc.mp4

Does this by any chance has what you're looking?

slmjkdbtl avatar Sep 04 '21 16:09 slmjkdbtl

Does not work for me. I tried in index.js by adding it but the canvas is taking 100% width and height.

I am looking for something like window resize listener to set the width and height of game here such that it keeps the scaling intact.

It would be helpful to have the game scale well on different resolutions and screen sizes, done via the library.

Here is the config i am using. kaboom({ global: true, fullscreen: true, scale: 2, crisp: false, debug: false, clearColor: [0, 0.4, 0.6, 0.6], canvas: document.getElementById("game"), width: 640, height: 480, });

ShubhenduVaid avatar Sep 05 '21 19:09 ShubhenduVaid

Yeah dynamic sizing on window resize is not there but planned

slmjkdbtl avatar Sep 16 '21 07:09 slmjkdbtl

Already added in latest @next (from alpha 1)

lajbel avatar Oct 14 '22 02:10 lajbel