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.

Code Snippets / True Blur - Motion blur with any object.

Author
Message
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 31st Oct 2004 01:57

This code produces an effect similar to motion blur. You can modify the complexity of the blur and which object to blur by changing the designated varibles. By changing the gosubs, you can modify the effect. The blur will always use objects 1 to blurs+1. The blur only appears when your object is in motion, and fades out when it isn't.

The codes:


Use the mouse and up/down arrow keys to move.
Ues left/right to turn the object.
Use space to move the object.
Hold enter to pause the object and blur.

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."

Attachments

Login to view attachments
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Oct 2004 01:04
Nothing but a cube here. No blur.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 31st Oct 2004 01:06 Edited at: 31st Oct 2004 01:07
Try moving the camera around and then holding space.

The code uses alpha and was made in DBP 5.7.

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Oct 2004 02:45
Ah got it working. Looks pretty cool, though it does look a bit like a tadpole - try to make the size reductions greater as it goes forward?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 31st Oct 2004 09:29
Change 0.5 in the if spacekey()=1 line to something greater and the blur will be bigger.

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Oct 2004 10:06
It didn't blur that much for me, but it did blur. It's pretty cool.

There is only one way to package shaolin: Shaolin Soccer...
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 31st Oct 2004 11:50
Change the speed of the camera and object if you want it to blur more. For example:


Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 8th Nov 2004 21:20 Edited at: 9th Nov 2004 05:45
can u make it a function 4 me plz ?

[edit]

nice job.....it will be perfect for my subfighter game(back online)


ALPHA ZERO PRODUCTIONS
NEW WEBSITE ONLINE
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 9th Nov 2004 06:55 Edited at: 9th Nov 2004 06:55
Quote: "Could not understand command at line 40 'set alpha mapping on n,int(100/n)'"


I have pro Version 5.7 installed.

1800+ XP - GeforceFX 5600 - 256MbDDR - 60Gb Hdd - XP Pro
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 9th Nov 2004 07:16
Quote: " can u make it a function 4 me plz ?"




Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 9th Nov 2004 08:24
u made some mistakes on the functions


ALPHA ZERO PRODUCTIONS
NEW WEBSITE ONLINE
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 10th Nov 2004 10:31
Functions were psycocode.

Here's the real code:


Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 11th Nov 2004 07:19
Ilya,

Looks very good. Found it difficult to keep on screen, but when I did the blurring effect was cool.

Cheers,

Cloggy

Login to post a reply

Server time is: 2025-05-10 02:04:24
Your offset time is: 2025-05-10 02:04:24