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 / Camery is being jittery

Author
Message
Big Irv
19
Years of Service
User Offline
Joined: 18th Dec 2004
Location:
Posted: 7th Apr 2005 01:45
When i try to move around in my bsp world the cam doesn move it jsut jitters hers the code

REM Project: station
REM Created: 4/4/2005 12:05:37 PM
REM
REM ***** Main Source File *****
REM

rem TUT3A
rem Initial settings
sync on : sync rate 100
backdrop off : hide mouse
rem Load all media for game
gosub _load_game
rem Setup all objects for game
gosub _setup_game

rem TUT3B
rem Game loop
do
rem Control game elements
gosub _control_player
gosub _control_gunandbullet
gosub _control_enemies
rem Update screen
sync
rem End loop
loop
rem TUT3C
_control_player:
rem TUT5A
rem Trigger player initialisation
restart=1

rem TUT5B
rem In case of restart
if restart=1
restart=0
set bsp collision off 1
rotate camera 0,0,0
position camera 2,2,2
set bsp camera collision 1,0,0.75,0
endif
rem TUT5C
rem Control player direction
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.2 : 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#

rem Apply simple gravity to player
position camera camera position x(),camera position y()-0.1,camera position z()
rem TUT5D
rem Player is always focal point of sky

rem Position listener at player for 3D sound
position listener camera position x(),camera position y(),camera position z()
rotate listener camera angle x(),camera angle y(),camera angle z()

return
_control_gunandbullet:
return
_control_enemies:
return
_control_stats:
return
_setup_game:
return
_load_game:
rem TUT4A
rem Load BSP world and sky model
load bsp "","station.bsp"

rem TUT4B
rem Setup camera
set camera range 1,10000
autocam off
rem TUT4C
rem Select font
set text font "arial" : set text size 16
set text to bold : set text transparent
rem Loading prompt
sync : center text screen width()/2,screen height()/2,"LOADING" : sync

return
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 7th Apr 2005 02:25 Edited at: 7th Apr 2005 02:26
your level is proberly too big or has too much stuff in. make a simple box as the level and if that judders then it isnt the level but if it does then try reducing the amount of stuff in the level or make it in sections and hide parts of it untill you are near to it.

Any spelling mistakes are totally In tensional.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 8th Apr 2005 04:51 Edited at: 8th Apr 2005 04:52
Try replacing your 5 lines under 'Rem Control Player Movement' with this one line. See if that helps.

Position Camera Camera Position X(0)+((RightKey()-LeftKey())*0.2),Camera Position Y(0),Camera Position Z(0)+((Upkey()-DownKey())*0.2)

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Big Irv
19
Years of Service
User Offline
Joined: 18th Dec 2004
Location:
Posted: 11th Apr 2005 02:46
well now the thing wont even load all i get a blackscreen without the loading screen script but if i leave the loadin screen it gets stuck on that
NestEgg
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location:
Posted: 11th Apr 2005 05:53
Try using a tripod, stops the camera from shaking.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 11th Apr 2005 18:29
That change should not have caused that. Post your code as it is now. Also, use the Code brackets please.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2024-09-23 17:29:48
Your offset time is: 2024-09-23 17:29:48