screen problem.

phillipPbor

Member
i happend to stumble upon a problem that i cant fix,
recently i was making 2D tarraria with game maker studio 2
but while making a game, i found out the problem is that off-screen is black.

after following the tutorial of minecraft part 3 here
following tutorials from the other user here

i checked the result and it didnt looked very promising.

1604870559692.png
outside the room is black, i tried everything.... but no avail....
even with background sprite, nothing. GMS2 is nothing like GMS
 

Yal

🐧 *penguin noises*
GMC Elder
There's a checkbox "Clear Display Buffer", turn that off:
Screenshot from 2020-11-09 10-22-58.png
 

saffeine

Member
View_xport[0] = x - (View_xport[0]/2);
View_yport[0] = y - (View_yport[0]/2);
here you're using view_xport[0] instead of view_xview[0], and the same for y. you're setting the port size to the x and y positions, minus half of its own dimensions.
i don't know if that's copied directly from the project since you've capitalised View in all 4 places which breaks the GML syntax, but if that's the code, that's most likely your issue there.
 
Last edited:

Yal

🐧 *penguin noises*
GMC Elder
here you're using view_xport[0] instead of view_xview[0], and the same for y. you're setting the port size to the x and y positions, minus half of its own dimensions.
i don't know if that's copied directly from the project since you've capitalised View in all 4 places which breaks the GML syntax, but if that's the code, that's most likely your issue there.
Oh yeah, if this actually sets the viewport somewhere (where the name is spelled correctly) it could potentially move the viewport out of the window (which leaves an area filled with the window background color, which is different from the background color that views are cleared with) - I thought "clear display buffer" would take care about that too since the back buffer is a single surface (application_surface, to be precise) but now I'm not so sure anymore.
 

phillipPbor

Member
Oh yeah, if this actually sets the viewport somewhere (where the name is spelled correctly) it could potentially move the viewport out of the window (which leaves an area filled with the window background color, which is different from the background color that views are cleared with) - I thought "clear display buffer" would take care about that too since the back buffer is a single surface (application_surface, to be precise) but now I'm not so sure anymore.
did you notice a new topic here? you can check if you want.
 

Yal

🐧 *penguin noises*
GMC Elder
did you notice a new topic here? you can check if you want.
No, I didn't, and no, I don't want to. What part of my post are you responding to?
 
Top