Log In  

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!

P#83030 2020-10-17 10:45 ( Edited 2020-10-17 10:47)

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!

P#83053 2020-10-18 01:25

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.



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.)

P#83061 2020-10-18 09:20 ( Edited 2020-10-18 09:24)

Thank you as soon as I can I’ll give it a try and let you know!

P#83065 2020-10-18 10:44

Found the post that gives more info on my answer: https://www.lexaloffle.com/bbs/?pid=19223#p19223

P#83099 2020-10-19 01:08

@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.

P#83112 2020-10-19 09:21 ( Edited 2020-10-19 09:21)

@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:

P#83344 2020-10-25 14:41


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! 👍

P#83359 2020-10-26 08:05

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-09-23 09:58:59 | 0.041s | Q:18