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.

Program Announcements / My Snow Effect [DBPro, Source Code + Functions Included]

Author
Message
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Jul 2007 05:05 Edited at: 30th Aug 2008 18:32
Hello. THis is just a small snow demo that I made. Well, that's pretty much it.

Download Here (7/24/07)

Screenshot:


Feel free to use it if you like so long as you give me credit. Enjoy, and please comment

Download Here (7/24/07)

Mr Tank
20
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 24th Jul 2007 05:44
It looks very nice indeed! I get around 30fps. I'm going to read the .dba and see how you did it. If i can get it running a bit quicker it might be going in my game.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Zerk
16
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 24th Jul 2007 05:49
Thats got to be one of the coolest snow effects I have ever seen. And so simply and gracefully implemented! Well done!

zParticle 1.0b released! An advanced particle system plugin for DBP!
New Website and Download link!
Mistrel
Retired Moderator
17
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 24th Jul 2007 06:35
Awsome demo, Sixty Squares. Thank you for sharing it with us.

http://3dfolio.com
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Jul 2007 14:06 Edited at: 24th Jul 2007 14:17
@Mr Tank: Thanks You can always decrease the number of snow objects used to increase FPS. The more objects you use the more snowflakes but the lower the FPS. I'm going to go comment the code more so it's easier to understand what each variable does what(although you can check the Snow Functions.dba file for parameter descriptions)

@Zerk: Thank you And also, thanks for the matrix smoothing code. It's been pretty useful.

@Mistrel: You're welcome.

Marvey
20
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 24th Jul 2007 14:14
nice work mate
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Jul 2007 14:33 Edited at: 25th Jul 2007 04:16
@Marvey: Thanks!

@Everyone: I've commented the code (not the function code) and I will upload the new version as soon as I can.

EDIT: Okay it's updpated Here's the modified normal code (more comments)



wind27382
16
Years of Service
User Offline
Joined: 10th Feb 2006
Location:
Posted: 31st Jul 2007 22:41
hey thanks I'm going to try and use this in my game.If i do i will give you credit

wind
MonoCoder
16
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 1st Aug 2007 18:37
Very cool. Just a shot in the dark, but I imagine the large matrix is causing some of the slow down.

Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 2nd Aug 2007 03:38 Edited at: 2nd Aug 2007 03:39
@wind27382: Feel free to use it so long as you don't sell the game

@MonoCoder: Possibly. I'm not really an expert when it comes to speed. All I know how to do is hide off-screen objects and not create too many

Mr Kohlenstoff
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 2nd Aug 2007 20:14
Demo looks great, very natural chaotic snow.

Quote: " All I know how to do is hide off-screen objects and not create too many"


Just to tell you.. I have tried hiding objects outside screen using "if object in screen(ID)=0 then hide object ID else show object ID" or something like this, but it just slowed the game down a bit.. maybe DBP doesn't show objects outside screen on it's own? But I'm not sure, I prefer programming 2D-Games...

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1
Uncle Sam
17
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 2nd Aug 2007 22:45 Edited at: 2nd Aug 2007 22:51
Downloading now, I'll give it a try.

EDIT:

Neat effect! It looks great. It ran lovely, at the locked level of 60 fps. When I unlocked it it was 400+, which is very smooth considering it was using a matrix for the terrain.

Good job.
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Aug 2007 02:52
@Mr Kohlenstoff: Thanks I usually use EXCLUDE OBJECT ON, for I've heard that it's even better.

@Uncle Sam: Thanks

@Everyone: I just realized that it can do rain as well! The rain image in there right now is HORRIBLE, but if you get a better one with drops falling straight down you can get a decent effect. Try doing this:

1. Decrease the Storm Intensity variable to 5.
2. Increase the fall speed to 40.
3. Use a good rain texture instead of the snow one (you can actually make one using vertical boxes in paint, lol).
4. Change the ice texture on the matrix to grass.
5. Make the fog gray.

Alquerian
16
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 4th Aug 2007 02:07
Pretty cool little snow effect. I was able to make 1 quick change to improve framecount from 98 to 115-ish by changing this:

to this:


in 'Snow Functions.dba'. I am curious if making all the objects as limbs of a parent object then just offsetting the plains would further increase performance? Not sure. I would have to try it out.

Cool alternative to the default particles though Good work!

Visit the Wip!
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 4th Aug 2007 15:24 Edited at: 4th Aug 2007 15:24
Thanks I didn't know that clone object was faster than just making the object over and over again. Thanks for telling me that.

Uncle Sam
17
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 5th Aug 2007 02:52
Try instancing it using:



...and you should gain even more FPS.
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 5th Aug 2007 04:36
Of course! Instance object! Lol guess I was so focused on the effect itself that I forgot to optimize Thanks.

Alquerian
16
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 7th Aug 2007 02:03
Instancing is faster, but once you instance it, you can't modify it's transparency, texture or shape. There might be a few other things you can't do with instanced objects. With snow, you shouldn't need to change each flake's transparency or coloring, so instancing WOULD be optimal but there was something in your code that made me clone it instead of instance it (I think it had something to do with texture or ghosting or something).

Visit the Wip!
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 7th Aug 2007 19:18
Oh right I used SCROLL OBJECT TEXTURE.

Because you love me
17
Years of Service
User Offline
Joined: 24th Feb 2005
Location: Leicester, England
Posted: 26th Oct 2007 11:07
Aaah, I love snow. I'll have to dig out the snow demo I made. Its a completely different effect to this. What I did was have a number of large plains randomly placed infront of the camera (and facing the camera), and then draw a dot that moves like snow through a continually cycling number of frames. Over time the animation grows and although it was obviously a computer generated effect, i could watch it for ages

All that probably didnt make much sense unless you are aquainted with the amiga and its wonderful 'bobs' (which im sure there are loads of you as darkbasic is so similar to amos). I wouldn't mind gazing at it again myself!
C0wbox
16
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 30th Oct 2007 01:03
I don't like that music, its scared me since I got DBP.

QuothTheRaven
20
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 30th Oct 2007 01:09
Quote: "Aaah, I love snow. I'll have to dig out the snow demo I made. Its a completely different effect to this. What I did was have a number of large plains randomly placed infront of the camera (and facing the camera), and then draw a dot that moves like snow through a continually cycling number of frames. Over time the animation grows and although it was obviously a computer generated effect, i could watch it for ages"

3 day ban for bumping a two month old thread, but glad you liked it!

Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Nov 2007 22:59
@Because you love me: I'm glad you liked the demo Intresting approach with the animated snow idea.

@C0wbox: The music comes with DBPro so you can't escape it!

UFO
17
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 1st Nov 2007 23:24
I got 17 fps >.<
I need a new computer...

It was very cool though. The only bad thing was the texture, which was kind of ugly, but the snow effect is awesome.

Quote: "3 day ban for bumping a two month old thread, but glad you liked it!"


QuothTheRaven - You're not a mod... or are you undercover or something O.o

Your signature has been erased by a bad joke
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Nov 2007 23:36
@UFO: Thanks The texture is something I put together in photoshop via the airbrush tool lol...

sneaky smith12
16
Years of Service
User Offline
Joined: 30th Apr 2006
Location: Like id tell you, oh wait i just did
Posted: 24th Nov 2007 06:56
One thing though... snow usually heads down... in the demo it all goes toward the camera.

If at first you dont succeed, LOWER YOUR STANDARDS.
TEH_CODERER
19
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 25th Nov 2007 10:30
Its emulating the wind as well.

Your signature has been erased by a mod - image max size is 600x120
BMacZero
16
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 9th Dec 2007 16:44
43-55 FPS here . Pretty cool!


"Ok, so that wasn't funny. I don' have any good Christmas jokes."
Sixty Squares
16
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Dec 2007 20:04
@TEH_CODERER: That's right.

@bmaczero: Thanks

Login to post a reply

Server time is: 2022-11-28 07:33:06
Your offset time is: 2022-11-28 07:33:06