#HELLPPP screen issuses

94 messages · Page 1 of 1 (latest)

tough radish
tough radish
#

project settings

fresh glacier
#

what things look weird how?

tough radish
#

Like this

#

Or even worse on smaller screens

fresh glacier
#

i assume that's the postprocessing shader?

tough radish
#

this is how the level up menu looks like on my smaller screen

tough radish
fresh glacier
#

what happens if you turn that crt shader off and try playing it in a smaller window, does that look right?

tough radish
#

Let me see

fresh glacier
#

just to figure out if it's a shader or ui issue

tough radish
fresh glacier
#

no, it has to do with disabling that crt shader and checking whether it looks wrong still then.

#

just make whatever node that shader is on (looks like a colorrect ig) invisible, run your game and see what it does when you make the window smaller

#

(and then tell/show the result)

tough radish
#

without crt

fresh glacier
#

is that what it's supposed to look like?

tough radish
#

No

fresh glacier
#

then you have some problems with your ui positions, i'd say. what stretch/scale mode is that window on?

tough radish
#

does this help?

fresh glacier
#

no. as i asked:

what stretch/scale mode is that window on?

tough radish
#

the game window or the machine?

fresh glacier
#

the wat?

#

the window

#

in your project settings

tough radish
#

Which window

#

Ah

fresh glacier
#

the one your game lives in. the only window.

tough radish
#

Here

fresh glacier
#

so stretching is disabled

#

so as you resize the window, the canvas gets resized, not stretched.

tough radish
#

should it be canvas items or viewport?

fresh glacier
#

probably wanna turn that to canvas_items instead, so the canvas coordinate grid gets stretched

#

(viewport instead scales the output image, which you probably dont want)

tough radish
#

what does viewport do

#

I will try it now

fresh glacier
#

essentially, if a node is at 100,100 and you stretch twice in canvas mode, it'll render at 200,200 at the large resolution. if you stretch twice in viewport mode, it renders at 100,100 at the small resolution, then grabs every pixel it rendered and scales them up.

#

remember to try without the shader first, so we can see if your UI is fixed first just in case both are behaving wonky.

tough radish
#

Well shit

#

i tried with shader but there is another problem now

#

The screen is eated from both sides

fresh glacier
# tough radish does this help?

also unrelated but while we're at it, that black popup thing (levelup menu i think) is scaled like crazy, dont do that, makes it all ugly and pixelated, just increase the actual font size instead.

tough radish
fresh glacier
tough radish
fresh glacier
# tough radish

ok please show that again but scrolled down further, and without that search filter in the top.

#

(specifically i need to see all of the "Stretch" section)

tough radish
fresh glacier
#

ah i see

#

you're designing for a rectangular window right?

#

like one that's wider than tall, like most screens?

tough radish
#

Yes

fresh glacier
#

but you told it in "Size-> Viewport Width/Height" to assume a square one for its base

#

so you've actually designed outside your base viewport

#

so now with it stretching correctly, it'll crop all that off.

tough radish
#

i get it now but what do i change it to?

fresh glacier
#

set the base viewport size at the top there to what you actually want as your default window size, then fix your design (use the purple box in the editor as guides, that's that size).

tough radish
#

I dont know how much i should put

fresh glacier
#

that's completely up to you. could e.g. be the resolution of your screen. or whatever default window size you want. or whatever the size in the website you're embedding it in, etc.

tough radish
#

Uhhh

#

i think i see the problem

fresh glacier
#

well yeah i told you the problem, you put some of your game outside its "coordinate grid"

#

and you didnt notice because you told it to ignore that setting when stretching (with stretch_mode = disabled). now you fixed that, so now your problem becomes visible.

tough radish
#

I tried it on my device and it seems better

#

can you take a quick look?

fresh glacier
#

looking if "it works on my machine" wont actually help you much tho, please tell what you changed and if everything lines up right at the various sizes now, still without the shader running.

silk robin
# tough radish

Set the Stretch mode to "Viewport" instead of "Canvas Items"

#

If I had to guess, you don't have the anchors set properly on your ColorRect with the shader and that's causing the UVs to extend beyond the visible game window when it's rescaled. If you stretch based on the viewport that won't matter, and it will fix the bug with the camera being "zoomed in" on smaller screens

fresh glacier
silk robin
#

Did they send the shader code?

fresh glacier
#

no, but a screenshot of where they hardcoded the resolution into a uniform. and again, please let's fix the input of the shader before fixing the shader. "garbage in, garbage out" and all that, it's way harder to debug a shader if its input sampler already is wrong.

silk robin
#

which is using SCREEN_UV (line 98). That resolution parameter is for the pixellation effect

fresh glacier
#

ah according to that they just used that parameter wrong 😛

fresh glacier
tough radish
#

what i changed was the strech mode to canvas items

#

and res to 1920, 1080

tough radish
#

i want the screen to fit everything in for every size of screens

#

now this haseverything

#

but not the same colour as full screen

#

i should also set the ui order higher than enemies but that is another task