October 18, 2019, 06:25:13 PM

Author Topic: What am I doing wrong  (Read 72 times)

Offline bsisko

  • Jr. Member
  • **
  • Posts: 64
What am I doing wrong
« on: October 09, 2019, 03:26:08 AM »
This code executes fine, but it displays a blank screen.  My target is a Windows desktop machine

Code: [Select]
'*******************************************************************************************************************************
'*
'*
'*
'*
'*
'*******************************************************************************************************************************

'******************************************************************* 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!

Offline MikeHart

  • Hero Member
  • *****
  • Posts: 617
    • Cerberus X
Re: What am I doing wrong
« Reply #1 on: October 09, 2019, 06:14:59 AM »
I am not surprised. Nothing of your title class is ever being called.