08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

At the top there is a box labeled Enable the use of Views. You must check this box to use<br />

views. Below this you see the list of at most eight views you can define. Below the list you can<br />

give information for the views. First of all you must indicate whether the view should be visible<br />

when the room starts. Make sure at least one view is visible. Visible views are shown in bold.<br />

A view is defined by a rectangular area in the room. This is the area that must be shown in the<br />

view. You specify the position of the top-left corner and the width and height of this area.<br />

Secondly, you must specify where this area is shown in the window on the screen. This is<br />

called the (view)port. Again you specify the position of the top-left corner and the size. If you<br />

have a single view the position is typically (0,0). Note that the size of the port can be different<br />

from the size of the view. In this case the view will be scaled to fit in the port. (In code it is<br />

also possible to rotate a view.) The ports can overlap. In this case the are drawn in the<br />

indicated order on top of each other.<br />

As indicated above, you often want the view to follow a certain object. This object you can<br />

indicate at the bottom. If there are multiple instances of this object, only the first one is<br />

followed by the view. (In code you can also indicate that a particular instance must be<br />

followed.) Normally the character should be able to walk around a bit <strong>with</strong>out the view<br />

changing. Only when the character gets close to the boundary of the view, should the view<br />

change. You can specify the size of the border that must remain visible around the object.<br />

Finally, you can restrict the speed <strong>with</strong> which the view changes. This might mean that the<br />

character can walk off the screen, but it gives a much smoother game play. Use -1 if you want<br />

the view to change instantaneously.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!