I'm trying to create a page for my game on itch.io using the html version.
I've managed to get the game running, my issue is with the canvas size.
Take this game as example (not mine): https://stevepopo.itch.io/fartjumper
You can see the huge border around the player.
No matter the canvas size I choose, the game just not fit that well.
I would like to obtain something more like this at least:
Do you have a solution for this?
Some special canvas size I've not tried yet, or something to change in the html file?
The fastest thing to me seems to just pick the color for the page and change in the html file the background color to fit it.
It's a bit of a shame to have the page "ruined" by those huge borders!
I think the canvas (where the game is drawn) is surrounded by a div that encloses the buttons on the right. You can’t remove it, but you can change the color used for it!
I looked at the sample page in Chrome's DOM inspector. You'd need to change two values, one on a div around the embedded iframe, and one on a div inside the iframe.
Before:
After:
I've never done any HTML exports, nor worked with itch, so I dunno what's involved in getting those two values changed, but that seems to do the trick if you can get those changes made.
(Obvious caveats apply if itch adjusts sizes dynamically for mobile or different resolutions.)
Found the post that gives more info on my answer: https://www.lexaloffle.com/bbs/?pid=19223#p19223
@merwok I've seen that post but, apart from the color, I couldn't understand more. Now I don't know why I think I've understood more from it, so thank you for posting it! I'll also give it a try to the <br> thing, bug I think that by keeping the body color you get the easiest and better result.
@merwok @Felice
Thank you all for your comments!
After digging into this, I've decided to create a guide, if you want to take a look:
https://www.lexaloffle.com/bbs/?tid=40036
Yay, I'm glad you figured out how to get what you want, and good work doing a write-up for the rest of the community! 👍
[Please log in to post a comment]