So I've started making a simplified 3D mario clone for world 1-1 just this morning, and already run into a problem I can't solve!
I've written and run 3d programs before, but this just isn't working. When I compile, I just get a black screen; I can't see my 3d objects?!. I've been searching the forums but haven't figured out a solution yet.
Thanks in advance, also please bear in mind I've just started using DBPro so my code may not be good for a multitude of reasons :S
remstart
PROJECT: Simple 2.5D Platformer Level
World 1-1 Mario
Date of Commencement: 8.7.2010
remend
`SETUP
SYNC ON
SYNC RATE 60
AUTOCAM OFF
`CONSTS
GLOBAL SCREEN_X AS FLOAT = 600.0
GLOBAL SCREEN_Y AS FLOAT = 600.0
`Screen Setup
SET WINDOW ON
SET WINDOW SIZE SCREEN_X, SCREEN_Y
SET DISPLAY MODE SCREEN_X, SCREEN_Y, 32
`CREATE USER DEFINED TYPES
`Type Vect2
TYPE Vect2
x AS FLOAT
y AS FLOAT
ENDTYPE
`Mario UDT
TYPE Player
Objnum AS INTEGER
Position AS Vect2
Speed AS FLOAT
Lives AS INTEGER
Score AS INTEGER
ENDTYPE
`Stationary Object UDT
TYPE Prop
ObjNum AS INTEGER
Position AS Vect2
ENDTYPE
`Movable UDT
`Pickup (3 of) UDT
`Enemy One (move) UDT
`Enemy Two (move and shoot) UDT
`GLOBAL VARIABLE DEFINITIONS
GLOBAL dt AS FLOAT
GLOBAL GndPlane AS Prop
GndPlane.ObjNum = 150
GndPlane.Position.x = 0
GndPlane.Position.y = 0
GLOBAL Mario AS PLAYER
Mario.Objnum = 151
Mario.Position.x = 0
Mario.Position.y = 0
Mario.Speed = 10.0
Mario.Lives = 3
Mario.Score = 0
`More GLOBALs here as I create more enitites
`GLOBAL DIM Pipes() AS Prop
`GLOBAL DIM Blocks() AS Prop
`OBJECT INITIALISATION
`LOAD OBJECT "ground_plane.x", GndPlane.Objnum
`POSITION OBJECT GndPlane.Objnum, 0, 0 , 0
MAKE OBJECT SPHERE Mario.Objnum, 15
COLOR OBJECT Mario.Objnum, RGB(255, 0, 0)
POSITION OBJECT Mario.Objnum, 0, 0, 0
`CAMERA INITIALISATION
MAKE CAMERA 1
POSITION CAMERA 1 , 0 , 0 , -100
POINT CAMERA 1, 0, 0, 0
`Backdrop Initialization
COLOR BACKDROP 1 , RGB( 0 , 0 , 0 )
` GAME LOOP
WHILE ESCAPEKEY() = 0
` Delta Time Update
IF SCREEN FPS() <> 0
dt = SCREEN FPS()
dt = 1.0 / dt
ELSE
dt = 0.016666
ENDIF
`Game Function calls LoadLevel() etc
`SET DOWN
SYNC
CLS
EXIT
ENDWHILE
`Write functions here later on
I'm looking for the true nature of things. But I'm not cynical at all. Or sarcastic for that matter. Now tell me: where is the irony here?