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.

DarkBASIC Professional Discussion / Loading half-life bsp maps problems

Author
Message
Chenak
17
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 17th Sep 2002 22:08
HI! I got DB Pro a few days ago and it seems to be brill although it has a lot of bugs. I loaded a halflife map into DB and 4 some reason sometimes the camera either falls though the floor or goes through the wall. Might be a bug or just me, anyway, heres the code, feel free to use it and please inform me of any improvements i can make. Cheers

Rem Project: test
Rem Created: 15/09/02 16:23:33

Rem ***** Main Source File *****

sync on

sync rate 100


load bitmap "bitmaps\menu.bmp"

set text size 30
set text to bold

center text 400,340,"New Game"
center text 400,380,"Load Game"
center text 400,420,"Options"
center text 400,460,"Exit"


do


if spacekey()=1 then level#=1



if mode=0
if level#=1
hide mouse
cls
sync : center text screen width()/2,screen height()/2,"LOADING" : sync
backdrop on
color backdrop rgb(0,0,0)

load bsp "",".bsp"


position camera 0,70,12,55
set bsp camera collision 1,0,2,0
set bsp collision threshhold 1,0.01
level#=0
mode=1
endif
endif



rem --------------------mode1--------------------------------------------
if mode=1

rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0

rem Control player movement
cx#=camera angle x(0) : cy#=camera angle y(0)
if upkey()=1 then xrotate camera 0,0 : move camera 0,0.2 : xrotate camera 0,cx#
if downkey()=1 then xrotate camera 0,0 : move camera 0,-0.15 : xrotate camera 0,cx#
if leftkey()=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy#
if rightkey()=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy#
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 and wrapvalue(camera angle x(0))
Chenak
17
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 17th Sep 2002 22:10
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))<280 then xrotate camera 0,280


if inkey$()="w" then walkthroughmode=1
if inkey$()="e" then walkthroughmode=0

cx#=camera position x()
cz#=camera position z()



if walkthroughmode=0
cy#=camera position y()-0.1
else
cy#=camera position y()
endif

if inkey$()="q" then cy#=cy#+.5
if inkey$()="a" then cy#=cy#-.5

if spacekey()=1 then cy#=cy#+.5
position camera cx#,cy#+.05,cz#


if walkthroughmode=1
set cursor 0,0
print cx#
set cursor 200,0
print cy#
set cursor 400,0
print cz#

set cursor 0,20

print "walkthroughmode"

endif

endif

rem ---------------mode1-------------------------------------------

sync
loop

Mike Johnson
TGC Developer
17
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 18th Sep 2002 19:04
Have you installed the latest patch? Can you still fall through the floor then?

Mike
Pickles
17
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 18th Sep 2002 19:30
Does your BSP level have some "leaks". There were a few in the Room Demo. Maybe it is a DBPro bug that creates the leaks, but it is also well known that level building is a skill that takes practice and during the process many things can go wrong. Alot of the editors themselves have bugs that make leaks. Also, using alot of cut brushes in the level can create leaks as well.

Anyways, it is just a suggestion and my not even be the problem. Just something to check out.

Chenak
17
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 18th Sep 2002 20:24
Yep the patch is installed as far as know. I'll just wait for the new patch to come out which is supposed to fix most of the problems.

Maybe it is the level creator creating the bugs or DBPRO or it could just be my crappy programming. It's still a pain in the backside though.
rapscaLLion
17
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 18th Sep 2002 23:38
My map works fine... It's the TFC version of de_dust for counterstrike. I choose it because of it's fame and it has no entities, the only thing missing is the sky!

Alex Wanuch
aka rapscaLLion
Get the DB Weekly Newsletter at www.dbwn.cjb.net

Login to post a reply

Server time is: 2019-11-13 19:50:33
Your offset time is: 2019-11-13 19:50:33