About Views in GameMaker: Studio - dummies

About Views in GameMaker: Studio

By Michael Rohde

The basic concept of working with Views in GameMaker: Studio is that only a portion of the Room is seen at any given time. You set it up so that the Room actually moves down the screen along with Objects that you manually place in the Room.

For an example on how to use Views, refer to the in-software tutorial Scrolling Shooter. In this tutorial, you begin by creating a background that moves down the screen to give an appearance of a scrolling background. All the enemies, islands, and so forth are randomly generated in the initial version of the game.

In contrast, while working with Views, the Room itself actually moves down the screen, and the enemies and islands are manually placed in the Room instead of being randomly generated. This set of instructions focuses on creating a game with a View.

Now that the plane has some speed, you need to add speed to the Object you’re using for the bullet. You do this in a similar fashion as you did with the Vertical Speed Action. To add speed to the player’s bullets, follow these steps:

  1. Open obj_mybullet (the Object you want to use for the bullet) from the Resource tree.

    The GameMaker interface.
    The GameMaker interface.

    Along the left pane, you can find the Resource tree, which contains a quick list of resources, including Sprites, Sounds, Backgrounds, Objects, Rooms, and more.

    This Object was created as part of the Scrolling Shooter tutorial.

    The Object Properties window opens.

  2. Choose Add Event→Create (if the Create Event doesn’t already exist).

    The Create Event appears in the Events section of the Object Properties window.

  3. Drag and drop the Vertical Speed Action from the Move tab into the Actions section.

    The Vertical Speed window appears.

  4. Enter –16 in the Vert. Speed field.

    You want the bullet to move much faster than the plane.

  5. Click OK in the Vertical Speed window.

    The Vertical Speed window saves and closes.

  6. Click OK in the Object Properties window.

    The Object Properties window saves and closes.