• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Wide-Ranging-Backgrounds and their resolution-problems

Hi there.

I´m just developing my first game, that is aiming on android/iOS-gaming.
I set up the levels on a world-size of 9000 x 1080 px. The viewport-camera-size
is currently set on 1280 x 800 px.

I put four background-layers for parallaxing effects - they do work!
Unfortunately the imported PNGs for those look rather dissolved in rough pixels.
I previously illustrated mountains over a range of 9000 px, RGB, resoluted in 72dpi.
Is there a possibility to improve the display of these imported images, when I run
the game via GMS2?

I remarked: The smaler the imported imagesize is, the better the resolution?
From what is it depending? Or can I split a big image into several images for
a image chain, that I can connect on a parallaxable stage?

Grateful for your help.
Yours, Archi. :)
 
L

LittleRobotGames

Guest
There are two things that I recommend that you do.

1. Turn of Interpolation in the global settings of your game. This will prevent the program from trying to decide sort of in-between pixels of your images and make them look sharp.
2. Add the following code in the "Draw GUI" event of some sort of controller object:

Code:
display_set_gui_size(1280,800);
surface_reset_target();
This code will re-render your graphics to closer match the actual pixels on the screen rather than trying to only scale up the pixels in your view. This will also allow pretty much any resolution of image to look good in your game, especially pixelated styles.

Hope this helps!
 

obscene

Member
Max texture size is 8192x8192. Default is 2048x2048. This will cause your images to be scaled down. Make sure to increase it and design for that.
 
Pretty sure you're crazy trying to get a 9000 pixel width image to load on a mobile. As @obscene pointed out max texture size is 8192x8192 and default is 2048x2048. This means any image larger than that will be resized to fit on the texture page. On top of that, the default texture page is normally the around the maximum texture page size you want for mobile. You want the smallest texture page sizes you can handle on mobile, tbh.
 

RangerX

Member
Graphical assets that don't fit a texture page at cut in half, not ajusted. So what does happen to your 9000 pix background if you have the texture pages set to 2048?

- 9000 is resized to 4500.
- Engine realises it still doesn't fit so it resizes in half again to 2250.
- Then it realises it still doesn't fit so it resizes it to 1125.
- When you game runs, the code says this asset should be 9000 px wide so the engine STRETCHES it back to 9000.
- Result: looks like poopy-poop.
 
Hi There.

I´ve thought by myself, that wouldn`t work. Thank you for your comments.
I`ve created BGs with a maximum width of 1800px (72dpi) for horizontal parallaxing.
The stage of maze is 9000px wide, but the viewport endformat is actually set on
600 x 980 px.

BW, Archi
 
Top