Search code examples
game-maker

Game Maker window and room are rectangle but room is a square in testing


I have different sized rooms in my project. One room is a rectangle, 800by400. I have set the window to 800 by 400 but the room comes up 400 by 400 with black spaces on the left and right side. Why is this and how can I fix it?


Solution

  • You need resize window, application surface and gui size.

    window_set_size(room_width, room_height);
    surface_resize(application_surface, room_width, room_height);
    display_set_gui_size(room_width, room_height);
    

    (for example, in Room start event)