What am I doing wrong

Started by Amanda Dearheart, October 09, 2019, 03:26:08

Previous topic - Next topic

Amanda Dearheart

This code executes fine, but it displays a blank screen.  My target is a Windows desktop machine


'*******************************************************************************************************************************
'*
'*
'*
'*
'*
'*******************************************************************************************************************************

'******************************************************************* imports  **************************************************

Import mojo
Import mojo2
' Import vortex

'******************************************************************  classes  **************************************************
Class Game Extends App
Method OnCreate()
End Method
Method OnUpdate()
End Method
Method OnRender()
End Method
End


Class Title

Field Kanvas : Canvas '   this is the drawing surface
Field Plaque : Image '   png image the holds the title of the game
Field x, y    : Int '   used to hold the x, y coordinates of the title
Field Width, Height      : Int '   used to set the width, height of the title
Field DevlopmentDir        : String '   while working on the game, sets the directroy path of assets
Field ReleaseDir        : String '   once the game is ready to sell, this is the path to look for assets most likely C:\Program Files

Method OnCreate()
DevelopmentDir = "C:\Users\Gary\Documents\temp\Active Projects\Blitz3d CerberusX\lined up\media\images\"
ReleaseDir = "C:\Program Files\Crazy Scorpion\"
Self.Width = 800
Self.Height = 600
Kanvas = New Canvas
Plaque = New Image(Self.Width, Self.Height)
Plaque = LoadImage(DevelopmentDir + "title.png")
Self.x = 1920 / 2
Self.y = 1080 / 2
End Method

Method OnUpdate()
End Method

Method OnRender()
Kanvas.DrawImage Plaque, Title.x, Title.y
End Method
End

'******************************************************************  globals  **************************************************
'******************************************************************  functions  ************************************************

Function Main()
New Game
End Function

Prepare to be assimilated !  Resistance is futile!

MikeHart

I am not surprised. Nothing of your title class is ever being called.