This is pretty much my first game in DBPro. I'm currently working on a 3D pong-like game, but my walls are "smearing" across the screen with and without textures on the walls. I'm not sure if it's my computer or not. You will need to dummy up a background image on line 10 or rem it out. Otherwise I have rem'ed out anything that would not load if you just slapped the code into your IDE and compiled/ran it. I have attached an image below to better explain this. Thanks in advanced for even viewing.
`Disable Stuff
hide mouse
autocam off
backdrop off
`Position Camera
position camera 150,150,0
`Create Background
load bitmap "C:\Users\Mitchell\Desktop\Extreme Pong\Textures\background.jpg",0
set current bitmap 0
`Load Images
`load image "C:\Users\Mitchell\Desktop\Extreme Pong\Textures\TestTexture.png",1
`load image "C:\Users\Mitchell\Desktop\Extreme Pong\Textures\PaddleTexture.png",2
`Ball
make object sphere 1,20
color object 1,rgb(0,255,0)
`Player Paddle
make object plane 2,50,30
`texture object 2,2
set object transparency 2,1
`Bottom Wall
make object plane 3,300,600
rotate object 3,90,0,0
position object 3,150,0,450
`texture object 3,1
`Top Wall
make object plane 4,300,600
rotate object 4,90,0,0
position object 4,150,200,450
`texture object 4,1
`Left Wall
make object plane 5,600,200
rotate object 5,0,90,0
position object 5,0,100,450
`texture object 5,1
`Back Wall
make object plane 6,300,200
position object 6,150,100,750
`texture object 6,1
`Right Wall
make object plane 7,600,200
rotate object 7,0,90,0
position object 7,300,100,450
`texture object 7,1
`Computer Paddle
make object plane 8,50,30
texture object 8,2
set object transparency 8,1
`Initial Camera Location
CamLocX#=150
CamLocY#=150
CamLocZ#=0
`Initial Ball Location
BallPosX# = 150
BallPosY# = 100
BallPosZ# = 300
`Initial Ball Direction
BallDirectionX# = 1
BallDirectionY# = 1
BallDirectionZ# = 1
`Initial Ball Speed
BallSpeed# = .1
`Player Paddle Speed
PaddleSpeed# = .2
do
`Check to see if the ball bounces off a paddle
PaddleCollisionPlayer = object collision(1,2)
PaddleCollisionCPU = object collision(1,8)
`If ball hits paddle then reverse direction
if PaddleCollisionPlayer > 0 or PaddleCollisionCPU > 0
BallDirectionZ# = BallDirectionZ# * -1
PaddleCollisionPlayer = 0
PaddleCollisionCPU = 0
color object 1,rgb(rnd(255),rnd(255),rnd(255))
endif
`Make ball bounce off the walls, score if it hits front or back wall
if BallPosX# > 290 or BallPosX# < 10 then BallDirectionX# = BallDirectionX# * -1
if BallPosY# > 190 or BallPosY# < 10 then BallDirectionY# = BallDirectionY# * -1
if BallPosZ# > 750
BallDirectionZ# = BallDirectionZ# * -1
set object cull 6,1
`print ScorePlayer;"-";ScoreCPU
sleep 300
ScorePlayer = ScorePlayer + 1
set object cull 6,0
endif
if BallPosZ# < 160
BallDirectionZ# = BallDirectionZ# * -1
ScoreCPU = ScoreCPU + 1
`print ScorePlayer;"-";ScoreCPU
wait key
endif
`Make the ball Move
if BallDirectionX# = 1
inc BallPosX#, BallSpeed#
else
dec BallPosX#, BallSpeed#
endif
if BallDirectionY# = 1
inc BallPosY#, BallSpeed#
else
dec BallPosY#, BallSpeed#
endif
if BallDirectionZ# = 1
inc BallPosZ#, BallSpeed#
else
dec BallPosZ#, BallSpeed#
endif
position object 1,BallPosX#,BallPosY#,BallPosZ#
`Move the player paddle
if upkey()=1
inc CamLocY#, PaddleSpeed#
if CamLocY# > 194 then CamLocY# = 195
position camera CamLocX#,CamLocY#,CamLocZ#
endif
if downkey()=1
dec CamLocY#, PaddleSpeed#
if CamLocY# < 6 then CamLocY# = 5
position camera CamLocX#,CamLocY#,CamLocZ#
endif
if leftkey()=1
dec CamLocX#, PaddleSpeed#
if CamLocX# < 6 then CamLocX# = 5
position camera CamLocX#,CamLocY#,CamLocZ#
endif
if rightkey()=1
inc CamLocX#, PaddleSpeed#
if CamLocX# > 294 then CamLocX# = 295
position camera CamLocX#,CamLocY#,CamLocZ#
endif
`Sync player paddle/camera movement
PaddleLocX# = CamLocX#
PaddleLocY# = CamLocY#
PaddleLocZ# = CamLocZ# + 160
if PaddleLocX# < 26
PaddleLocX# = 25
endif
if PaddleLocX# > 274
PaddleLocX# = 275
endif
if PaddleLocY# < 16
PaddleLocY# = 15
endif
if PaddleLocY# > 184
PaddleLocY# = 185
endif
position object 2,PaddleLocX#,PaddleLocY#,PaddleLocZ#
position object 8,BallPosX#,BallPosY#,PaddleLocZ#+580
sync
loop
Forgive me for sometimes I am such a noob.