Game Maker Follow Screen

  1. Game Maker Follow Player
  2. Game Maker Follow Screens
  3. Game Maker Follow Screen Free
  1. Views can also be used in two-player games, as they permit you to create a split-screen setup in which in one part of the screen you see one player and in another part you see the other player. A third use is in games in which part of the room should scroll (e.g. With the main character) while another part is fixed (for example some status panel).
  2. Which type of Game maker do you use? Wednesday, January 29, 2014. How To Make The Screen Follow The Player Hi gamers! This fast post will show you how to make the screen follow your player. This is very helpful when you make a 2-D side-scroller such as Mario.
  3. It's *probably* not a bug in Game Maker. I use views for a static health bar on a moving screen? Draw_GUI event automatically follow the view and are.

Game Maker Follow Player

GameMaker: View following two objects at once. This example is going to be of great use for everyone making local multi-player games, as well games requiring to display two objects on screen at once generally. Well you could always assign all four separate objects to a parent, and have the screen follow the parent. I hope this helps.

Active3 years, 10 months ago

I have a text box element in game on my gui which is loaded in after the user enters the room.

the object hierarchy is:txt_ChatBox>gui_textBox_base>ui_focus_base>ui_base

this is the draw event where everything happens

In game it works but it also adds part of it to the map like this

EDIT: something new I have found is that the one on the map is the physical instance of the control but all the drawing for text happens in the drawGUI call. I.e. the on click handler that give it focus only works on the on map one.

I made the map/physical one move at the start of the drawGUI to where I wanted it to be but it was off from the gui one by a bit during scrolling which could be smoothed out but I don't think that is the right answer (see updated code above).

I have a feeling I need to say please be part of the view rather than part of the map right??

Maker
Matthew Optional Meehan
Matthew Optional MeehanMatthew Optional Meehan
3694 gold badges8 silver badges20 bronze badges

1 Answer

To draw something fixed on the screen, you have two common options:

The Draw Event

Game Maker Follow Screens

This Event will draw Sprites, Pixels, Lines, etc within the Room. In order to make this appear in the same place, you'll need to offset whatever you're drawing with view_xview and view_yview. Note that both of these are arrays, so you should use whichever view you're using for your main display. If that made no sense to you, then just use view_xview[0] and view_yview[0].

This approach has some drawbacks. If you scale or rotate the view, whatever you've drawn will scale and rotate too. Seeing as that's probably not what you want, then I recommend the other approach.

Game Maker Follow Screen

The Draw GUI Event

Rather than drawing within the Room, this Event will draw on the screen. As such, you should use coordinates that match this. To determine the width and height of your display, use the display_get_width() and display_get_height() methods.

This is by far the preferred method, as you'll be drawing to the screen, rather than within the room. This method also supports view scaling and rotation, as you're drawing to the screen directly.

Boom

Game Maker Follow Screen Free

Boom
5133 gold badges7 silver badges18 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged game-maker or ask your own question.