Hy! I'm making a star trek video game, it will start off as a prototype where you will pilot the starship enterprise and the fight Borg in space. Basically I am having an issue loading font files and displaying them. The text does not show up for one, and two a couple of times when I tried to fix my code it just crashed. And three it crashes when I go to my QUITSTATE by pressing escape. Is there a way around this? By the way I am using Hybrid, It is a modern version of Blitz3D that I got on the forums.
Global MENUSTATE
Global PLAYSTATE
Global QUITSTATE
Global STATE
Global Font
Font = LoadFont("Final Frontier Shipside.ttf", 24, False, False, False)
Function STATE(STATE)
STATE = MENUSTATE
If STATE= MENUSTATE Then
ElseIf KeyHit(1) Then
STATE= QUITSTATE
ElseIf KeyHit(57) Then
STATE = PLAYSTATE
End If
If STATE = PLAYSTATE Then
ElseIf KeyHit(1) Then
STATE = MENUSTATE
End If
If STATE = QUITSTATE Then
End
End If
End Function
If STATE = MENUSTATE Then
Graphics3D 640,480,16, 1
SetBuffer BackBuffer()
camera=CreateCamera()
CameraViewport camera,0,0,800,600
light=CreateLight()
Music = PlayMusic ("Star Trek.wav")
SetFont Font
Text 800, 0, "Hy! This is my Star Trek video game prototype, this is property of DonVito Napolitano.", True
Text 600, 0, "Press space to play or otherwise press the escape key to be assimilated.", True
End If
While Not KeyHit(1)
UpdateWorld
RenderWorld
Flip
Wend
If STATE = QUITSTATE Then
FreeFont Font
End If
End
|