view

  1. T

    How can I limit a space in my room where the view can move? / fixating a view in a specific spot on

    Hello everyone! I am making a mobile platform fighter (using GMS 1.4) that looks like this: So, the idea is to have a big square in the center where the action takes place and on the top and bottom we have each player’s controller. I made a prototype and got a few feedbacks from my friends...
  2. P

    View/camera preceding player

    I’ve been following Shaun’s tutorials and have my camera following behind the players character sprite. How would I change that code to get the camera to be x pixels in front of the player sprite? I’d like to make the camera be 10 pixels in front when the character walks and 25 when they run...
  3. L

    GMS 2 [SOLVED] Camera moved by pushing the screen's edge with mouse

    There are many great tutorials for an easy camera setup (for example: ), but in these the camera follows either the obj_player or the mouse, while I need a mostly static view that is only move if the mouse is at or near one of the screen edges or a WASD buttons pressed (like in most top-down...
  4. Silver_Mantis

    Windows Multiple Root Views Error is Seriously a Killer Issue.

    I've had this happen several times and I have just had it with Game Maker Studio. I cannot believe my files just keep getting corrupted over and over again. This is probably the 6th time. And this time even my back up copy wont load. So it looks like I have to import everything from scratch into...
  5. xery555

    Only keeping the view inside the room horizontally

    Hi! I have a problem with the view function in Game Maker. I want the view to not go outside the room horizontally, but ignore the room height. It should follow the player. So I have this code: view_xview[0] = x - (view_wview[0]/2); view_yview[0] = y - (view_hview[0]/2); But that makes the...
  6. ruwcom

    Legacy GM [SOLVED] An object checks if another object is in the view

    So I have a wall that prevents the player to move forward until there are no enemies on the view, I though the easiest way was to check just that and then destroy itself, but the code needs to run in the wall object, how can I do that? collisions don't seem to work. Also It can't be...
  7. LanderMiskolczi

    Legacy GM Camera Wont Shake

    For some reason my camera wont shake, when I press H the screen should shake, but instead it stays still like normal. Here is the step event /// Follow the player if (instance_exists(oPlayer)) { var xTo = (oPlayer.x - x) / 25; var yTo = ((oPlayer.y - 16) - y) / 25; } x += xTo; y += yTo...
  8. Jscoombs

    Looking up/down

    Hello everyone. I am making a platformer game and I want the player to be able to look up or down while holding the up or down key for a few seconds. I haven't done much with alarms, so I don't totally understand them. I have the camera movements working, but I'm not sure how to implement an...
  9. 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)...
  10. P

    Windows View not following object because of high speed

    Hello guys, so I have this 2d top down starship game and the thing is everything works fine for now but I use this code In the step event to follow the player because the player ship is almost always outside the room borders. The only problem is the player object often exceeds speeds of up to...
  11. Storm1208

    Legacy GM [SOLVED] Corner Collision Causing Incorrect X and Y Values?

    Hey All! I'm currently working on a recreation of the popular platformer "VVVVVV" and started using the view system in GameMaker to make small, 640x480 levels in my project. These levels are all contained within one room, and when the player walks far enough out of one view it switches to...
  12. Meester Dennis

    Android / Amazon Fire Panning mobile

    Dear people, I'm looking for an tutorial, extension or some help with panning in an mobile game. I'm trying to create an way to swipe with my finger true the room. So te player can swipe and see everything. I already tried something. My resolution script is: (I'm in the team off Pelistar now...
  13. J

    How can I set the transparency of a view?

    Im making a map with a minimap, but the minimap is a view of the room, but smaller. The player can get behind the view, and this is all good, but now I cant see the player. Can I make the view transparent so I can see the map, and the player? If this isnt possible, what should I do to make...
  14. Hudsonius

    Help deactivating objects not in the view? [SOLVED]

    I'm using a very large room with hundreds of objects in it, and I needed to deactivate objects not in the view, so I used: instance_activate_region(vx,vy,vw,vh, true) instance_deactivate_region(vx,vy,vw,vh,false,true) In the controller object. (I set vx, vy, vw, and vh to be view x, view y...
  15. jobjorgos

    Legacy GM how to create surface only in the area of view[0]?

    I have a shader for all my rooms of the size below: nightCycleSurf = surface_create(8192, 8192); But it causes lag, so how can I make the surface to be just the size of view[0] (which is variable of size and position in the room)? I just copied all the shader data from a youtube tutorial so I...
  16. Anixias

    GMS 2 Better View movement?

    I have an issue that I've always worked around by allowing fractional view coordinates, although that distorts all of the artwork of the game. Basically, I have an isometric view and I set the view to the round() of whatever position I want it at. When my player moves cardinally, it looks fine...
  17. AndHeDrew

    GMS 2 Scaling game surface with different sized rooms

    Hello! I've been trying to crack this problem for a while, and I haven't been able to find a solution. I am adapting Pixelated Pope's scaling method to work with my game, and I'm stuck. Here's what I'm trying to do: 1. Determine the size of the monitor 2. Scale the application surface height...
  18. D

    Sub-pixel Camera Movement in GM2

    So I'm not sure if this has already been addressed for gamemaker 2. I'm trying to figure out how to move the camera at sub-pixel increments for my game. I actually had this working in the older version of gamemaker but I wanted to upgrade. I am used to using views instead of this new camera...
  19. BulleTech Studios

    Query - Drawing to Camera/View - camera_get_active() vs. view_camera

    I was recently 'pulling my hair out' trying to figure out why my code for drawing a cursor (without mouse_x and mouse_y) to a camera view wasn't working... and I'm still not sure. I was using functions like camera_get_view_x(camera_get_active()); as suggested in a YT video I found "Using and...
  20. AiNaKa

    Legacy GM Struggling with camera object and views

    So I wanted to try and make the view move dynamically between "subrooms". I created this system for subrooms, where when a player collides with a specific object, it will define the subroom, and a seperate object will define the dimensions of said subroom within the room. The camera object is...
Top