Dont think I have posted this here before so if anyones interested...
Remstart
*** Bullet Time Code ****
| By Delta |
| KingDAZZA@lineone.net |
| 05/02/2002 |
************************
This example will show how to add a simple Bullet Time
feature like the one in Max Payne into your games or
programs
note that animated models will also need to have there
animations slowed
feel free to credit me if you find it useful
Remend
` Setting up display
set display mode 1024,768,16 : sync on : hide mouse : sync rate 50
cls : ` Attention all coders, Please add CLS at the beginning
` of programs or after switching resolution to fix a
` bug that effects a small number of systems when
` running DarkBASIC programs, Thanks
` Creating Objects and Start Values, m# should be 1 set to 1
make object cube 1,10 : m#=1
` This stuff is just to show when Bullet Time is working
text$ = "Bullet Time... Just like Max Payne... quick... someone overhype Me!!"
set text size 36 : set text font "Comic Sans MS"
` Main Loop
do
x#=OBJECT ANGLE x(1)
y#=OBJECT ANGLE y(1)
` *m# is added to the end of all movement values for all
` objects that will be effected when Bullet Time is on
x#=x#+1*m#
y#=y#+1*m#
x# = wrapvalue(x#)
y# = wrapvalue(y#)
ROTATE OBJECT 1,x#,y#,0
` In this demo space is used to activate Bullet Time, when
` the space key is pressed m# has its value changed to a
` lower value, Because all object's effected are multiplyed
` by m# anyhing less than 1 will slow all objects down
` anything above 1 will increase the speeds, if the space
` key is not pressed then m# is set to 1
if spacekey()=1
m#=0.2
Center Text 512,675,text$
else
m#=1
endif
sync
loop