When making a game with a set resolution your game has black borders as expected, my feature request is being able to edit these to display textures or anything else of the sort, this can be faked via zooming in but I’d rather have it be a baked in feature to avoid unintended issues showing up in the future
This is probably most commonly seen with the Super Game Boy or ports onto modern consoles, i.e Undertale, Omori
Hello! For some context: The black “borders” you see when setting a specific resolution smaller than the display are portions of the screen not actually rendered by the engine (PixiJS). Nothing can be displayed there as it’s not part of the rendered area.
What you’re describing is possible today, but you’re instead going to set your game resolution to either be adaptive, or a fixed widescreen resolution. Then you just make an image that has the center part cut out (transparent) for the “real” rendered area that you want, and you place that image on it’s own layer above everything else.
If you want finer control of this, you can set up some zoom events with math to do an inverse zoom based off the resolution of the display. But you’re going to have to work out the math to make it specifically how you want.
That’s super smart. While it’s outside of the PIxiJS renderer itself, it is having electron read it as part of the HTML5 code.
I’m not 100% sure you could do that same method via events as I’m not sure whether the engine could preface the actual game logic(upon being built by electron builder). Worth someone investigating.
Otherwise, the method I mention above would work for people not wanting to modify their source code/exported code.
I am gonna have to get that printed and framed at some point
I’m not 100% sure you could do that same method via events as I’m not sure whether the engine could preface the actual game logic(upon being built by electron builder). Worth someone investigating.
I have the above working from just a single line in a JS event box within the editor. I am sure it could be ported over to have it as an actual event if there was a request for it, however saying that I am not sure what type of issue(s) it could cause down the line.
Someone much smarter then myself would have to comment / look into that.
Do you think it’d work for more “static” decorations like in the OP?
To get exactly what OP wants it’s probably gonna require a bit of work and / or forcing the size of the window / resolution.
We can update the size of the image to something like cover (stretch), but even then it’s not perfect as the canvas is either 100% of the width or height.
I reckon a good way to tackle it would be create either the background art at the maximum resolution (or make multiple versions for each resolution supported) and then have the borders in gdevelop it’s self.
Another way similar to the above is set margins of the window to match up with the image and then lock the window from resizing. Below is an example of setting the window x2.
I know my input isn’t needed at this point, but I would honestly be happy with either just tiling the unrendered border away or full on backgrounds being supported officially whether via extensions or straight up engine support
It would add a pretty big aesthetic upgrade to games that require a locked resolution for gameplay or graphical reasons without the extra hassle.
I think this would be more of an extension then added by default to the engine as it’s a pretty niche request.
I’ve not made any official extensions yet (only things for my projects) I can give it a crack this weekend or pass it over to someone who is more experienced with the current requirements and conventions.
Otherwise, I am more then happy to give you a copy of the project and you can tinker what I have to suit your needs.