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 Discussion / screen shake effect

Author
Message
Shafan
21
Years of Service
User Offline
Joined: 22nd Dec 2003
Location: israel
Posted: 9th Jan 2004 16:44
how i do that my screen will shake?
thankssssssssss
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 9th Jan 2004 17:19
Check out the Camera viewport commands... that should do the job

Juzt a dude who likez progging
Lampton Worm
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 9th Jan 2004 18:58
Hi,

Also it depends if you are doing 2d or 3d, and if you're using locked objects that ignore camera 0... i.e. if you have a first person game with a HUD, do you want the whole screen to shake or just the view point (i.e. not the HUD)? In though in 3d, generally, the camera command can be jumped about easy enough using rnd()...

if shake=1
position camera camx#+rnd(10),camy#+rnd(10),camz#
endif

That sort of thing maybe...

Hope it helps,
Cheers.
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 9th Jan 2004 19:02 Edited at: 9th Jan 2004 19:03
do while spacekey() = 1
move camera left, move camera right
loop

Login to post a reply

Server time is: 2025-05-22 06:12:34
Your offset time is: 2025-05-22 06:12:34