Designing Games with Game Maker - YoYo Games
Designing Games with Game Maker - YoYo Games
Designing Games with Game Maker - YoYo Games
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
,xscale,yscale,rot,c1,c2,c3,c4,alpha) The most general drawing<br />
function. It draws the indicated part of subimage subimg (-1 = current) of the<br />
sprite <strong>with</strong> the top-left corner of the part at position (x,y) but now <strong>with</strong> scale<br />
factors, a rotation angle, a color for each of the four vertices (top-left, top-<br />
right, bottom-right, and bottom-left), and an alpha transparency value. Note<br />
that rotation takes place around the top-left corner of the part.<br />
draw_background_ext(back,x,y,xscale,yscale,rot,color,alpha)<br />
Draws the background scaled and rotated <strong>with</strong> blending color (use c_white for<br />
no blending) and transparency alpha (0-1).<br />
draw_background_stretched_ext(back,x,y,w,h,color,alpha)<br />
Draws the background stretched to the indicated region. color is the blending<br />
color and alpha indicates the transparency setting.<br />
draw_background_tiled_ext(back,x,y,xscale,yscale,color,alph<br />
a) Draws the background tiled so that it fills the entire room but now <strong>with</strong><br />
scale factors and a color and transparency setting.<br />
draw_background_part_ext(back,left,top,width,height,x,y,xsc<br />
ale,yscale,color,alpha) Draws the indicated part of the background<br />
<strong>with</strong> the top-left corner of the part at position (x,y) but now <strong>with</strong> scale factors<br />
and a color and transparency setting.<br />
draw_background_general(back,left,top,width,height,x,y,xsca<br />
le,yscale,rot,c1,c2,c3,c4,alpha) The most general drawing function.<br />
It draws the indicated part of the background <strong>with</strong> the top-left corner of the<br />
part at position (x,y) but now <strong>with</strong> scale factors, a rotation angle, a color for<br />
each of the four vertices (top-left, top-right, bottom-right, and bottom-left),<br />
and an alpha transparency value. Note that rotation takes place around the<br />
top-left corner of the part.<br />
Drawing shapes<br />
There is a whole collection of functions available to draw different shapes. Also there are<br />
functions to draw text (see next section). You can only use these in the drawing event of an<br />
object; these functions in general don't make any sense anywhere else in code. Realize that<br />
collisions between instances are determined by their sprites (or masks) and not by what you<br />
actually draw. The following drawing functions exist that can be used to draw basic shapes.