Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I'm not sure how exactly it would work in code, but for resizing images, you'd want to

  • Figure out which dimension of the image is larger (is it really wide, or really tall?)
  • Grab the resolution setting (ex. if the player set it to 1600x900)

and then just resize the image so it maintains its ration, but the larger dimension fits within its respective dimension - so if the image is taller than it is wide, make it so the height of the image matches the height of the game window, and keep the height:width ratio of the image.

Hopefully that's not terribly complicated to actually implement, lmao

(+1)

Your idea is good - idea that I already add to code today and it will be in next release :) 

In new version, i made some improvments about resizing.  Could you test and tell me what do you think?

(1 edit)

I found a bug: I had a .webm in the folder I set, and seemingly any time the game tried to load it, it would prevent the game from cycling through images. If the .webm was the first one loaded, this image would be stuck on my screen:

and if it tried to cycle from an image (from the folder I set) to the .webm, the image would stop cycling through as well. 

The resizing seems to work fine, however - much appreciated.

[Edit: the image I attached would flash on my screen for a split second whenever I started the game from the menu, before it displayed the first image.]

(1 edit)

The wemb file was an image or a vid? If it is a pic it would be a reason - I made code for vids in webs and didn't think about testing pic in that format.

How long is that webm file? How big? Is it have strange name?  I have really no idea what what is the reason of this bug. Could you share this file with me?

It seems like webm files above a certain file size aren't being loaded correctly, although I'm not sure what that size limit is. 

The images and webms are all downloaded from E621 using the same third-party tool, so they're all named in the same way -  a string of letters and numbers. 

I created two new directories - one with 46 webms, all renamed to be "webm1.webm", "webm2.webm", etc. - and one with only 12 webms, all under 3 MB (for comparison, the biggest file in the other folder is 95.8 MB). Sometimes, one of the "webm1"s would load, one of the smaller ones, but afterwards it would get stuck on a black screen. The other folder loaded just fine, with it cycling through webms correctly - except for one point where it got stuck on a black screen. I'm not sure what happened there, as the largest file in the folder, 2.99 MB, was one of the first to be displayed in that round.

Things to note: I assume this is intentional, but webm videos ignore the setting for when images should cycle, and *usually* cycle at the end of the video. However, videos shorter than the setting (ex. two second long video, when its set to cycle every ten seconds) will loop until its time to cycle - but in between loops, there's probably half a second of just a black screen. This is especially jarring with very short videos.

Vids should play until end and then there should be next vid/pic. I have really no idea what could be reason of that problems because I just test vids event larger than 100MB and it works. And well vids change after their "End" even it is shorter than setting for pics ( it is both separete from each other in code). I will try to add in next version some kind of LogFile and make to print thre some informations.