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.

2D All the way! / set camera and sprites

Author
Message
diseased
20
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 7th Aug 2007 16:38
does set camera to image capture sprites?

Ive been trying to get a motion-blur effect via this code which was posted elsewhere on the forum, and use it on my sprite-based 2d sidescroller.

However, when I display the transparent screen-sprite which was suppose to capture the screen, for some reason it actually displays a frame from this demo code(posted below), along with fragmented peices of images of my 3d app.

I guess it is displaying what is stuck in the video memory or something. i even used the command Flush Video Memory, which did nothing, nor did restarting the computer.




set display mode 1024,768,32
autocam off
color backdrop 0
position camera 5,0,-20
blur#=255
set camera to image 0,1,1024,1024
set camera aspect 1024/768
sprite 1,0,0,1
set sprite 1,0,1
set sprite alpha 1,blur#
size sprite 1,screen width(),screen height()

for object=1 to 20
make object sphere object,1
color object object,rgb(rnd(255),rnd(255),rnd(255))
position object object,rnd(10)-5,rnd(10)-5,rnd(20)
next object


do

for object=1 to 20
position object object,object position x(object)+0.005*object*sin(theta#/object),object position y(object)+.005*object*cos(theta#+object/2.0),object position z(object)
next object
inc theta#,5

if spacekey()=1 then blur#=2
if blur#<253
inc blur#
endif
set sprite alpha 1,blur#
sprite t,0,0,1

sync
loop
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 13th Aug 2007 00:44 Edited at: 13th Aug 2007 01:20
I don't have DBP so can't really help with that method.
But you could do


[edit]
Sorry hadn't read it all

Your signature has been erased by a mod because it was rubbish.

Login to post a reply

Server time is: 2024-05-19 08:12:58
Your offset time is: 2024-05-19 08:12:58