viewport

  1. NovemberTender

    GMS 2.3+ Making a camera show the contents of another room?

    currently im making an interactable menu with simple objects and such, im not drawing a menu, im simply making another camera visible in another place and make it act as a "ingame menu". So my question is how can i make the camera be in the room the player is in, but show the contents of a...
  2. N

    SOLVED Trying to "Stop" a Camera From Going to Certain Parts of a Room

    Hi all, I'm currently working on a 2D game with a smooth moving camera that follows the player. The camera itself works fine and using clamp() I've managed to keep it only moving within the confines of the room it's placed in. I want to be able to control where the camera goes more precisely...
  3. M

    Legacy GM Ports (view_wport and view_hport) are broken, don't affect aspect ratio or resolution at all

    So as my title suggests I'm experiencing issues with view_wport and view_hport which I have never experienced before. I've used GMS 1.X for a few thousand hours across the last years and when writing a framework for handling scaling today I found this issue. For performance reasons I've...
  4. H

    Dynamic Viewport Mobile Devices

    Hi, I'am an absolute beginner in GM. I would like to adjust the view of the player according to the device aspect ratio. For example having a fix view width and see more of the room with taller devices. If I understood correctly from the manual I should use the cameras / view port as...
  5. K

    Viewport - wport hport not working

    view_enabled = true; global.camera_base_view = camera_create_view(0, 0, 360, 640); view_set_visible(0,true); view_set_camera(0, global.camera_base_view); view_set_wport(0, 360); view_set_yport(0, 640); view_set_xport(0, 0); view_set_yport(0, 0); But this is what I get:
  6. KingRegicon

    Simple Viewport Setup- Can I Toggle Tall and Wide?

    Hello, everyone! I have been practicing GML for a few weeks now, and I'm really loving the problem-solving aspect of programming. The manual, online tutorials and GML forum posts have helped me through every problem I've faced so far, but now I must write my own post in desperation. The Setup...
  7. L

    GMS 2.3+ Camera stuttering

    my camera is stuttering when I move it no matter what i do. can someone help me? {game maker studio 2}
  8. M

    SOLVED Changing Viewport width and height does nothing

    So I'm trying to make my game fullscreen dynamically, Changing the width and height of the camera works but changing any information of the viewport doesn't do anything at all. //changing viewport information, not working view_enabled = true; view_visible[0] = true; view_wport[0] =...
  9. O

    check_object_in_viewport()

    I want to be able to check whether or not the player is able to see an npc for a check to speak with them in a king's quest style game. if(object_in_viewport(object_id,viewsize_x,viewsize_y,player_pos) = true) { interactable = true } (this allows the code to continue with actions beyond this...
  10. Fluury

    Get size of "scaled" view / How to achieve pixel perfect scaling with free window scaling

    Heya. Following Issue: Similar to Nuclear Throne I'd like to allow the player to freely resize the window to their liking while keeping the area within the window the same - this means we get Black Bars. These are fine, what however isn't fine is the game's sprites getting all crusty...
  11. William Garrison

    Design Non Pixelart Game Resolutions

    Okay so my question is this...There are a blue million tuts on pixel art in GMS but what about non pixel games. Basically Im making a game that I cant upscale like a regular pixel art game. So how do you go about setting up the Room/Viewport/etc... Cant do it the pixel art way cause if it scales...
  12. S

    How to drag the camera at high x_border value

    I use the following code: view_enabled = true; view_visible[0] = true; var width = 480, height = 270, scale = 2; var cam = camera_create_view(0,0,width,height, 0, object0, -1, -1, 430, height/2); view_set_camera(0, cam); window_set_size(width*scale, height*scale)...
  13. V

    GMS 2 Viewport not changing

    Soooooo, I'm making a menu to my game and when I press the "New Game" option it goes to another room using "room_goto();", but, this room that i'm going to has a different viewport from the menu but it's not working. The viewport doesn't change, it keeps the viewport from the menu. Can somebody...
  14. C

    Android When I use multiple viewport, It cause touch area issue

    I use gamemaker studio 2. I have an issue about android device. The my room size is set at a ratio of 576: 1024 (9:16). When I set up Android graphics with 'keep aspect ratio', the cell phone like Galaxy s8 will have black letterbox on top and bottom. Because they have a ratio 9: 18+. At this...
  15. A

    Drag And Drop Check if object is in viewport ?

    Hello, How can I check if the instance of an object is in viewport, is there a function for this ? Or do I have to add multiple DND "if" to reproduce something like this ? if ( (x > view_xview[0]) && (y > view_yview[0]) && (x < (view_xview[0]+view_wview[0])) && (y <...
  16. S

    Switchting viewport messus up mouse cordinate in html5

    Hey I made an option to switch the viewport: the viewports are exactly the same with the difference, that the border is bigger/smaller my code I used for switching the viewport is this : if global.locked_cam = 1{ view_visible[0] = false; view_visible[1] = true; } if global.locked_cam = 0{...
  17. I

    GMS 2 [Solved] Unable to set window size

    IDE Version: GameMaker Studio 2.2.1.375 Current Runtime: 2.2.1.287 Windows 10 Home x86_64 When I try to set the window/surface size in GML or the first room's active viewport, the window turns out a bit more than half the size I put in, but window_get_width/height return the correct sizes. If...
  18. P

    GMS 2 Me and my hopeless Camera System

    So... I seriously, desperately need help with this thing. I wanted to try and figure this out on my own, to not have to bother you all about it... to no avail. It's been weeks since I tried to implement this stupid thing, and I still can't figure it out. So... nya. What I'm trying to do: I am...
  19. etbunce

    Android [SOLVED] Viewport Unwantedly Stretching to Fill Screen

    Hey y'all, Just trying to change the viewport size to maintain correct aspect ratio with the camera and leave some space for GUI elements, but the view always stretches to fill the whole screen, no matter the size. That's undesired. I don't want to maintain a fixed aspect ratio for the game...
  20. P

    Windows Creating a camera to the following specifications...

    Hello! The issue I bring you today is one that's been stumping me for weeks, so I thought I'd bring it to some individuals who perhaps know a bit more than I do. I'm trying to make a camera for my game that functions in an... unorthodox way. At its core, it's simple: it follows the player...
Top