checkCheck this awesome tutorial for scaling:
http://www.html5rocks.com/en/tutorials/casestudies/gopherwoord-studios-resizing-html5-games/https://web.dev/case-studies/gopherwoord-studios-resizing-html5-games
EDIT: an idea for object placement and scaling, not sure if its correct / practically doable. I am yet to try this:
- have some base dimension like (960 x 640)
- while writing game logic, handle positions / scale as if you are developing only for 960x640.
- at the time of rendering, multiply the position and scales with these factors
screenWidth / 960for x-axis andscreenHeight / 640for y-axis, wherescreenWidthandscreenHeightare actual screen dimenstionsdimensions.