Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Collision and object help

Author
Message
Wu dynasty
11
Years of Service
User Offline
Joined: 7th Feb 2013
Location: In a democracy
Posted: 12th Feb 2013 17:27
I am working on a school project and need help with my game. I would like to make a volcanoe in the middle of my game, texture it. I would also like to make the collision for the volcanoe and the walls. Any help would be gladly accepted. Serious answers only.
thanks,
Nathan


sync on : sync rate 0

REM WALLS
REM NORTH WALL
MAKE OBJECT BOX 2,2000,1000,10
ROTATE OBJECT 2,0,0,0
POSITION OBJECT 2,0,500,1005
TEXTURE OBJECT 2,2

rem EAST WALL
MAKE OBJECT BOX 3,2000,1000,10
ROTATE OBJECT 3,0,90,0
POSITION OBJECT 3,1005,500,0
TEXTURE OBJECT 3,2

REM SOUTH WALL
MAKE OBJECT BOX 4,2000,1000,10
ROTATE OBJECT 4,0,180,0
POSITION OBJECT 4,0,500,-1005
TEXTURE OBJECT 4,2

REM WEST WALL
MAKE OBJECT BOX 5,2000,1000,10
ROTATE OBJECT 5,0,270,0
POSITION OBJECT 5,-1005,500,0
TEXTURE OBJECT 5,2

Rem Floor
make object box 6,2000,1000,2000 : position object 6,0,-500,0 : color object 6,RGB(255,255,0)
Make object collision box 6,-1000,-500,-1000,1000,500,1000,0
texture object 6,1 : scale object texture 6,50,50

load object "e:\Nathan\Doomsday Rocks\objects\MILVEH14.x",1


s#=1
a#=1
dist#=-20 : ` distance camera sohuld be behind player
height#=5 : ` height above player that camera should be
smooth=10 : ` smoothing value

do
if upkey() then move object 1,-s#
if downkey() then move object 1,s#
if leftkey() then yrotate object 1,wrapvalue(object angle y(1)-a#)
if rightkey() then yrotate object 1,wrapvalue(object angle y(1)+a#)

set camera to follow object position x(1),object position y(1),object position z(1),object angle y(1),dist#,height#,smooth,0

sync
loop
`COLLISION
`Check Player Character
`Wall Collision
s# = 10
if get static collision hit(P1X#-s#,P1Y#-s#,P1Z#-s#, P1X#+s#,P1Y#+s#,P1Z#+s#, newP1X#-s#,newP1Y#-s#,newP1Z#-s#, newP1X#+s#,newP1Y#+s#,newP1Z#+s#) = 1
dec newP1X#, get static collision x()
dec newP1Y#, get static collision y()
dec newP1Z#, get static collision z()
position object 1,newP1X#,newP1Y#,newP1Z#
endif
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 13th Feb 2013 08:13
you have a DBPro?

this sample-code
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 13th Feb 2013 17:25
You could probably generate a decent volcano (and landscape) with Advanced Terrain, which is included with DBPro.

Alternately, you could model a volcano by hand with a free program like Sculptris.

D.D.

Login to post a reply

Server time is: 2024-11-23 13:33:40
Your offset time is: 2024-11-23 13:33:40