Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

My game's viewport is too big for the page, can i make it smaller with CSS?

A topic by Wondo created Jul 11, 2019 Views: 5,448 Replies: 3
Viewing posts 1 to 3
(1 edit)

So im making a unity webgl game whose resolution is 860x700, im rather new at unity development and im sure i've made many mistakes, one of them is is the game's aspect ratio, or rather, that it will ONLY look good embedded in the page if its 860 by 700, and the problem with that is that its too big




If i try to make it fullscreen, the whole screen goes to the left for some reason




The most responsible option I have is working on it so it can actually look good on any resolution but that is honestly too complicated for me at this point, i still have much unity to learn and id rather be able to concentrate on finishing the rest of the game rather than fighting the resolution right now, so i think i have an idea of how i want it to be solved:



If i change the zoom in my browser, the game scales properly, and I know that makes changes in the CSS file of the page

My theory is that i could make the game look a bit smaller so it can fit on a normal computer screen using a style sheet, either a custom itch style sheet or editing the unity index file, could anybody help me with that? I know what CSS is but i have no idea how it really works.

(1 edit)

Were you able to solve this? If so, how?

Edit: Found something similar in regard to going full-screen: https://www.reddit.com/r/gamedev/comments/39shqa/itchio_and_unity3d_webgl/

Won't help with the default view but this asset is awesome for full-screen: https://seansleblanc.itch.io/better-minimal-webgl-template

(+1)

thank's for sharing! it looks awesome

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.