Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

What to do with Embed BG? No matter how many times I change the image resolution there's an ugly gap forcing the edges tiling. Can't tell whether I should try on picking the random dimensions manually till the correct result appears or this is how it supposed to work in the first place?

(3 edits) (+1)

Hey there! I'm going to have to look into the Embed BG option, as I've never done an embedded html game before.

I couldn't find anything in the itch documentation on Embed BG...just this comment in the forums: https://itch.io/t/213380/whats-embed-bg-in-the-theme-editor

From some initial poking around, it looks like the image is being assigned to this div with the game_frame class on it. It appears on both the iframe and click to fullscreen embeded game variations.


(3 edits) (+1)

Here is a handful of games using it:

In every case I've looked at, the game creator has uploaded an image that is slightly bigger than the dimensions for the frame containing their game (i.e. the game_frame div).

It also looks like you can use a GIF if you want to use an animated image; the chicken game and Assessment Examination linked above both use gifs.

Can you send me a screenshot of the specific issue you're having? I'll can see if I can figure out the problem.

(1 edit) (+1)

Here's an example of how it gets  applied in the code from Mingle (right click on the image and select Open in New Tab to see it clearly)




Mingle is using an image that is 1920x1080 for the embed BG, and the game_frame div is 640x360. So the image being used is bigger than the dimensions of the frame. There's a gap on either side because the game_frame is only 640px wide while the inner column is the default 960px.

(+1)

Thanks for such a response!  It works now and I think the reason is the game resolution was bigger than my image size. I assume image should be the same size your game res is or higher. 

I assume image should be the same size your game res is or higher

Based on what I was seeing on other game pages, that's the answer I was starting to lean to. Every example I saw had the embed BG image resolution at the same resolution or a larger resolution than their game.

Without having an html embeded game to test for myself, I couldn't say with 100% certainty that was the answer.

Glad to hear that you got it resolved!

simplify it