camera

  1. D

    GameMaker Camera error

    Hello, I come to present the problem that happened to me with game maker studio 2, I download a very large map ( 11,200 x 1,152 ) and when moving to the room that has that sprite in the background and when using the function of the view and adjust it so that it follows the character and that...
  2. 2

    Legacy GM Objects Doing View Based Parallax Correctly by Scale, and Overlapping at Screen Center

    I want to have objects parallax correctly based on their scale and the camera view position, and have their position adjusted in the create event so objects that had the same xy coordinates will have a position offset that when added with parallax will allow them to all overlap in the center of...
  3. lyfe264_

    GML Convert GUI coordinates to real position in the level

    Hello, I would like to convert Camera coordinates to my level coordinates. Is it at least possible ? Thank you and have a nice day !
  4. S

    Screen problems

    I've been having two strange problems with resizing my game's window and screen. The first only seems to happen when I resize my game to a 21:9 resolution (840px). For some reason the main view is one pixel short, causing a visible seam in kind of the middle-right of the screen. You can even...
  5. D

    SOLVED Camera follow makes mouse position shaky

    Hello everyone! First, here's the video showing the problem: (sry for the bad video quality, but it is enough šŸ˜‚) As said in the title, the problem lies within the camera. Basically when my camera is following the player, the mouse position gets shaky (the white square at cursor in the video...
  6. Jotesco

    SOLVED Problems with backgrounds.

    I'm trying to make a moonrise and moonset,but I'm not knowing how to proceed. I need to make the moon stay always in camera,but move to go and back (moonrise and moonset). What's the best way? I tried to make a background Moon,but it's hard to me figure out how to follow camera and move at the...
  7. W

    Basic Camera

    Hi. I managed to make a basic camera function in my game and I'm very stuck right now because I wanted the camera to follow mouse and the player at the same time (The camera would move with the mouse but the player would still be clearly visible on screen) Please help.
  8. G

    SOLVED Gui element over player head

    Hi I'm trying to make gui element to apear over player head when gamepad button is pressed and to follow player. I tried drawing sprite in position relative to player position and it worked! Right until I change view to smaller. Right now I made it so it apear in set position in relation to...
  9. KyleRansford

    GameMaker How to Set a Camera Offset with a Target

    I've got a platformer game that I'm working on, and am having trouble with setting the Camera Position offset while following a target, which is the player. For instance, I know how to set the Camera borders with camera_set_view_border() which works ok, but, in certain areas of a level, I want...
  10. FeetUpGaming

    camera_set_default - Not working as expected

    Please can someone tell me what i'm missing? I'm an expierenced GML programmer who usually just sets the view camera and is done with it. However in my head creating a camera then setting the default camera to that should work. But it does nothing. What am i missing? #macro DefaultWidth 256...
  11. Plubu

    SOLVED Game's window when it starts it's at upper left of the screen

    Hello everyone, I have a game when it runs, it starts at the upper left of my windows screen, why's that? After the main menu however, it goes and fixes itself. //Room start //Camera Setup window_center(); global.CameraX = 0; global.CameraY = 0; target = Player_Object; CameraWidth = 960...
  12. M

    Switching rooms result in black screen

    So my issue is that there is one specific room that just shows a black screen when I use the room_goto function. In this case I have an enemy chase the player, and when the enemy touches the player, the game will switch to the battle room. I created an object with a transition sprite to act as...
  13. K

    how to insert a non-drawn object directly on the camera view?

    What happens is that I need exactly that, so that it is possible to check collisions between an object that was inserted in the room and another, that was added directly on the view (which is equivalent to what draw gui does, but I don't I want to draw). I just want to add it by fixing the x and...
  14. TheOnlyWRT

    Creating Cameras with Code Across Various Rooms

    Hello all, So I have learned that programmatically controlling the camera is a lot better than using the default camera settings in a room. However, I have an issue where the camera is only the appropriate size in one of my rooms. I tried putting code in the room_start event of my camera object...
  15. JeanSwamp

    Camera Jumps on first drag

    Hello, I have a very simple drag system for my camera, with a setup as such: Create: position_x = 0; position_y = 0; new_room_x = 0; new_room_y = 0; Drag Start: position_x = event_data[? "posX"]; position_y = event_data[? "posY"]; Dragging: new_room_x = position_x - event_data[? "rawposX"]...
  16. Foldup

    SOLVED Math, tweening between 2 numbers - Chamaeleon is cool

    Hello my friends!!! I am not the best with math, I am sorry to say, and I have been struggling. I want to use a function like LERP to move smoothly between 2 given values: currentwidth and goalwidth for smooth camera zooming. I thought lerp(currentwidth,goalwidth,.5) was the way to go, but...
  17. Mehdi

    SOLVED Deactivate instances outside of a view? (Perspective Camera)

    Hello friends, I implemented Matharoo's 2.5d camera to add parallax effect to my game: Tutorial However as you may know using 3d projection matrices disables 2d view functionalities. (e.g. viewX,viewY, viewWidth, viwHeight) Now for the purpose of optimization I need to deactivate instances...
  18. Mehdi

    GML View coords with perspective camera?

    I implemented a 2.5D camera using matrices. However it seems using this type of camera makes properties of ordinary cameras like viewX, viewY,, ... unavailable. Anyone knows how can I retrieve theses attributes while using viewmat and projmat?
  19. Heavybrush

    GML How to find the x and y position of the character in base of the camera

    hello I'm making a shader and there is a vignette inside it it would be the lamp if possible at the moment the center of the vignette is just the center of the uv float center = vsize - distance(vec2(0.5),uv); I would like to try to get the xy position of the character (followed by the...
  20. P

    HTML5 GMS 2 HTML 5 Export Camera Problem

    Hi guys! As you can see in the title of this thread, I am currently meeting a small problem with the HTML 5 export. I am using Mac OS, and the mac export version of the game works finely, camera following the player. However, I want to put my game on itch.io, so I HTML5 exported the game as a...
Top