Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Inside the OnCreate method, we want to determine the canvas size and load the sprite sheet and the game font. This is done as follows:
800 by 600 pixels, as the background image is of the exact same size.Method OnCreate:Int() SetUpdateRate(60) eng = New engine eng.SetCanvasSize(800,600)
ch = eng.canvasHeight cw = eng.canvasWidth
atlas field.atlas = LoadImage("ad_Tiles.png")
font1 = eng.LoadFont("ad_font")
Return 0
End