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.

DarkBASIC Professional Discussion / - DBPro Coding Challenges -

Author
Message
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 17th Oct 2005 08:56
FIREWORKS!!! WOO! hehehe... *puts thinking cap on*..... *then realises its a tea-cosy*

My Website:
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Oct 2005 01:52
Tinkergirl:

If you get chance, would you mind contacting me via e-mail please?

Thanks...

TDK_Man

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 18th Oct 2005 03:00
have been working on this all evening, let me know what you think.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 18th Oct 2005 03:47
niiiiice start... perhaps you could reuse any fireworks that arent being used rather than creating new ones though


Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Oct 2005 10:47
And maybe you can make the shape a little... less-square?

Immunity and Annihalation makes Immunihalation...
Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 18th Oct 2005 13:13
@Zotoaster
it does recycle the dead fireworks when all its sparks have died.

@sven b
that was my main gripe with it aswell, but it's sorted now.

Updated version here, let me know what you think?
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 18th Oct 2005 13:30
Looking forward to checking this - my lunch break soon! Even before seeing it, I'm impressed by how quick you are off the mark here, Dave1974.
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 18th Oct 2005 15:06
Oh! Great start!
I like that, a good 2d effort to kick it all off and set the bar

Initially I thought it lacked some weight, but that was easily solved by putting the sync rate to somewhere between 30 and 60 (I like both).
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 18th Oct 2005 16:44
Anyone wanna attach a compiled version for someone who doesn't have DBP on their machine?

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 18th Oct 2005 20:32
For classic users, heres a compiled version. (<750kb)

All though I have scanned it for viruses with Norton, run your favourtite scanner before running it.

Attachments

Login to view attachments
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 19th Oct 2005 15:11
That's a very nice effect, Dave!

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 19th Oct 2005 18:52
Thanks Tinkergirl and KLU 007.

Does anyone have any wips to show?
Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 19th Oct 2005 22:42
Updated it again.

Left and Right mouse buttons change the effect.

Attachments

Login to view attachments
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 19th Oct 2005 22:58
That's ACE! I really like the 'follow the mouse' effects - very nice looking

And I'm hoping we see some WIPs or entries from others too
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Oct 2005 23:14
@Dave

you might aswell start coming up with the next challenge right now


Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 20th Oct 2005 00:00
@Tinkergirl
Glad you like it.

@Zotoaster
I won't uncross my fingers just yet.

Now I just need to think of some more effects to add.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Oct 2005 00:12
Nice work Dave! Would make a good screensaver!

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 20th Oct 2005 00:44
I had an idea for 2 new effects, based on a tweeked circle effet.

Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 20th Oct 2005 01:24
This is my favourite one - that certainly is a DAMN good entry there Dave!!

Attachments

Login to view attachments
Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 20th Oct 2005 01:43
Thanks Nicholas.

I'm going to leave it alone for a few days, as I will be busy. When I'm back, I may have a few more things in it.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Oct 2005 02:24
Here's my stab at this challenge. The idea I had was to use the onion skin technique I employed for the tree challenge - hence the variable 'bushiness' still exists in this firework code! This means my fireworks are in true 3d, but have the apparant effect of being made from more particles than you would achieve using conventional 3d objects. Knew those trees would come in handy for something!



RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 20th Oct 2005 03:25
I was just thinking about your trees Ric. Beat me to the punch. Good work Dave and Ric! I'll have to see what I can do on this one.


Open MMORPG: It's your game!
sizer
20
Years of Service
User Offline
Joined: 11th Mar 2004
Location: texas
Posted: 20th Oct 2005 06:05 Edited at: 20th Oct 2005 06:07
i am not trying to be mean or hurtful in any way, but i had some issues with both entries that i thought might be errors with my system...

@ric: i've run yours a few times and the fireworks edges only show up in a funky shade of green and/or purple, with almost the rest in shades of grey?

@dave: great display, but... it starts at about 130fps then after about ten seconds it drops to around 30 to 50... why?

system specs below..
---------------------
off topic: i updated frogger can get from my web.
is now easier to control frog thanks to a timer tut that i found by TDK
-sizer

-------------------------------------------------------------
AMD Sempron 2800+ : 768MB RAM DDR400 : ATI 9800PRO 128MB AIW
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 20th Oct 2005 09:03
sizer, Ric's code is actually based on a different approach to particle effects that actually can use less resources than your typical particles (in theory, let's say 100 particles could be simulated with only a few polygons and a decent texture). The approach uses alpha mapping to blend objects to give the appearance of suspended particles. It's a very neat effect and honestly I like the fireworks effects it gives off, even if the colors are a little odd. With some tweaking work, I know Ric can adjust those to be more vibrant and colorful, but having used that same effect for grass, I know it's not easy.

As for Dave's code, it keeps adding more fireworks to the display (at least his original code did) which continuously slowed down the FPS. It's a neat way to demonstrate how many fireworks can be handled effectively on the various pc's.


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Oct 2005 14:43
Thanks for the explanation Rii - Yes, the colours are a bit weird - a bit of tweaking is all it needs. Will have a go at it tonight.

sizer
20
Years of Service
User Offline
Joined: 11th Mar 2004
Location: texas
Posted: 20th Oct 2005 19:57
thanks for the info, as i said, i just wanted to make sure my system wasn't going loopy.

-------------------------------------------------------------
AMD Sempron 2800+ : 768MB RAM DDR400 : ATI 9800PRO 128MB AIW
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 21st Oct 2005 15:08
Ric - some nice stuff there. Instantly recognisable as the 'fluffy tree' mechanics from the tree challenge a little while ago

I realise it's hard, but currently both entries seem to lack 'light' or something. They're both very good, but lack... oomph?

Dave, your sheer number of different fireworks options are stunning!

Maybe someone can prove me wrong.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 21st Oct 2005 16:36
'Fluffy tree mechanics' - I like that! You are right about my entry lacking 'oomph' - I'm working on it.

BTW, where are all the other entries?! Fireworks is a great challenge which everyone should be able to have a crack at!

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Oct 2005 16:44
You wait till tonight.. I have a free evening so I'm going to cherish every moment by using Dark Basic Pro

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 21st Oct 2005 19:36
Thanks to everyone.

There are two reasons for starting with a few fireworks, and then adding more.
The main one is to stager the launch times, to try and provide a constant stream of explosions.
The second one, as RiiDii said, is to find out how much the computer can handle.

@Ric
Nice one.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 21st Oct 2005 21:11 Edited at: 21st Oct 2005 21:14
As requested, I have added a little more 'oomph':



Hopefully the buildings help to demonstrate the 3d nature of the fireworks - ie some buildings appear infront of the fireworks, others behind .... pretty hard to do with 2d particles.

<edit> should mention - turn your speakers on!

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 21st Oct 2005 21:19
Chalk another one up for Ric! That is excellent!


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2005 00:39
Dammit... Thats too good :-(

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2005 02:27
ok here is my lame attemp... pretty high FPS...


I get about 200fps with those settings in a 640x480 window.

There is a weird bug on mine, it keeps flashing the particles up after they should reset. Any idea?

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2005 02:37 Edited at: 22nd Oct 2005 02:44
Ok - triple post time


A simple function at the top tweaks it to look really cool

In fact, on my PC if i change it to sync off then I get between 0 and 10% CPU usage and 30fps.. Pretty good for a screensaver me thinks

Might use it at work if it doesn't kill the PC

I've disabled the rotate camera command as it looks weird with the blur effect.

EDIT: I just noticed this thread has had over 24,000 views!!!!!

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 22nd Oct 2005 02:51
Wow - two very good entries there!

Ric, you're obviously showing off again Is there anything you CAN'T do with fluffy tree technology? You're right though - your last version has a lot more oomph to it, and the flashing buildings give it a nice sense of location. The sound is another good addition.

Nicholas you've achieved some very good brightness there, the fade works very well indeed. Good colour and I really like the nice arcing effect!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd Oct 2005 02:55 Edited at: 22nd Oct 2005 02:56
Oops - double posted. Ignore this!

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd Oct 2005 02:55 Edited at: 22nd Oct 2005 03:01
Thanks guys. Minor update - reflections on the buildings, sky lights up, more fireworks and better rocket noises.



@Nic - nice work. Like the projectile aspect to it.

CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 22nd Oct 2005 04:12
Ric - I've official decided you need to make a memblock sound tutorial
Great entry by the way! The "whine" sound got on my nerves after a bit, musta been the pitch of it or something, but it did get to me after a while...

Nick T - Awsome Job! I loved the trails on the objects, now all you need is buildings and a rotating camera like Ric's and I think you'll have him

Good luck to you both, and have a very merry time trying to judge between these two tinkerGirl!

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 22nd Oct 2005 04:43
Okay - here's a quickie. Just playing around with a different type of firework.




Open MMORPG: It's your game!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Oct 2005 11:20
cheater! using built-in particle emitter!

well, i was hoping to get in on this challenge, but i've had a hell of a week and not a very good one. coding challenges were the least of my worries.


Deadly Night Assassins
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2005 14:03 Edited at: 22nd Oct 2005 14:06
Another update. Taken advice. City built. Camera moved. More fireworks!!! Mwuhahahaha!!!

You MIGHT need to tweak a few values depending on your hardware. The FPS needs to be close to 100 most of the time or the fade effect looks crap.

Things you may tweak:
Quote: "FADE=20"

20 looks good on mine. Lower number gives longer trails, higher number makes them more "dot-like"
Quote: "
#constant F_COUNT 20
#constant F_PARTICLES 32
"

F_COUNT is the number of fireworks
F_PARTICLES is the number of bits that come off each firework. Therefore, F_COUNT*F_PARTICLES is the numebr of particles you machine has to deal with. They are instanced, so there is less of an impact as you might think, however is can still effect lesser PC's.

The settings are calibrated for my machine (2500+ Athlon, 1Gb DDR, 6800GT 256MB)

Here is the code!




Attachments

Login to view attachments
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 22nd Oct 2005 18:42 Edited at: 22nd Oct 2005 18:44
Nice...

I noticed that if you add this:



in your main loop and added this:



up above, and perhaps set the fade value to about 5-10 it makes a rather nice rotating around the city fireworks display.

Oh and if you add this:



At the very tiptop part of your code to replace what was there before, it gives everyone the best resolution possible

And finaly, AWSOME JOB! I especialy liked the 'blur' effect you used, very effective, very nice.


CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2005 18:50
I used to have it rotating (see any earlier versions) but i removed it because it made the trails blur in weird way. Just so you know - I did it in exactly that way (basically)!

Cheers for that res checker - thats VERY usefull indeed! I've been needing something like that for a while as I know it annoys a lot of people that I use such a high res (some people cant support it at all!)

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 22nd Oct 2005 22:30
Okay, here's a fun little explosion effect that should look a little familiar. Enjoy.




Open MMORPG: It's your game!
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 22nd Oct 2005 23:09
Some very nice improvements here, and nice to see RiiDii having a go too

Ric: Liked the lighting on the buildings, though the reflections are a little odd. Didn't notice them unless I looked for them though - it's still great

CPU: Oh, thanks. Like choosing between these four is going to be easy! Pff.

RiiDii: Liked the 'Fountain' style of firework a lot! It had a good feeling of 'glow' about it - something the other entries (and your second entry) have trouble capturing. The radial explosion effect is also nice - can you do me a catherine wheel now? Only joking.

Phaelax: Sorry about your week, hope your weekend is kinder to you :/

Nicholas: Great improvements there! The buildings, again, lend the fireworks a sense of both place and scale. They're obviously huge! The flashing is subtle, but nice. Great work.

Very good efforts from all four entrants so far. Don't worry Dave - I haven't forgotten your excellent entry in the flurry of later activity
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd Oct 2005 23:13 Edited at: 22nd Oct 2005 23:16
Dammit - thought I had this one in the bag until Nick came along. Think I need to incorporate a bit of projectile physics into mine to stay up with the competition.

@Rii - hey, I love Roman Candles! But that explosion looks like a nuclear explosion in space rather than a firework!

<edit> Oh yes, I forgot that Dave has a darn good entry too ....... I better get working!

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd Oct 2005 04:03
Nuclear explosions in space, fireworks, same thing

Yeah, I was going for more of an explosion - figured it was firework-ish enough - and wanted to go for a little variety.


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Oct 2005 04:58
My last version probably - done a bit more tweaking - nothing major. Fireworks are now more brightly coloured - no shades of grey or brown for example, which was possible before due to the random colour generation. Also added a blur effect, which I think also gives the fireworks a bit more of a sparkly effect you get around the edges. And yes, I agree, the sound does get annoying after about 5 seconds. Please adjust the volume control accordingly!



Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd Oct 2005 05:04
Interesting blur effect - I cant quite see how you did that right now.. I'll look harder tomorrow I think, quite tired

Good effect though! I like it.

I think this is gonna be a bitch to judge!

Login to post a reply

Server time is: 2024-11-23 18:16:42
Your offset time is: 2024-11-23 18:16:42