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.

The 20 Line Challenge / Bullet Time example in under 20 lines

Author
Message
Delta
20
Years of Service
User Offline
Joined: 15th Nov 2002
Location:
Posted: 15th Nov 2002 23:03
Now in under 20 lines my bullet time example :p

ok so it sucks but what they hey.. I cant be bother making something new (mabey tomorrow)

also note if you use this example with animated models you will need to slow there playing down too

and this formum dosnt work for me so ill need to post it directly.. everything below the line is the example

____________________

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

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

Login to post a reply

Server time is: 2022-12-06 10:24:43
Your offset time is: 2022-12-06 10:24:43