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 Discussion / Fireball explosions

Author
Message
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 22nd Mar 2004 18:00
Anyone have a tutorial on making fireball explosions (like the ones you see in alot of sci-fi movies when a ship explodes)? Even better, fireball explosions with a shockwave ring!

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 22nd Mar 2004 18:47
This is for DBC....Sorry for leaving that out.

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
LReM8888
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: The Land of the Fairies
Posted: 22nd Mar 2004 21:57
Here's my idea of wot *MIGHT*JUST* work...

The 'shockwave ring' = a plain with black bits set to be invisible, and a texture making it so all you see is a fiery ring shape that expands.

The 'fireball' = sphere with bumps and cracks in it, textured to look like a fiery ball with suitable Sound effect looping in the background, getting louder as the 'fireball' gets closer.

A 'fiery trail that's left by the fireball' = a good idea , and also one that I haven't much idea of how to implement...

LReM 8888
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 22nd Mar 2004 22:54
How do you set parts invisible?
Can you do that in Dark Basic or does it have to be done in the image editor eg.Photo Shop

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 24th Mar 2004 04:07
As long as part of an image is black, rgb(0,0,0), you can tell DBC to make it transparent. I always find it easier to use Paint Shop/Photo Shop to just leave the transparent parts transparent and save as a .png.

Crazy Donut Productions
Current Project: KillZone
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 24th Mar 2004 04:46 Edited at: 24th Mar 2004 05:01
Just wanna know, is the png format's transparency kinda like an alpha in a tga, or is it like gif? (have no time to test in db because changing monitor resolutions disconnects me from the internet...)

I also noticed that JessTicular has disappeared, and most of the DB replies are now suspiciously posted by Bear Crazy Donut. OMG! Bear killed Jess! lol

edit: scratch that, png transparency is still the same (one color). Oh well, at least it's smaller than bmp, and still of lossless quality.


"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 24th Mar 2004 06:26
I have made explosions very similar to this...



This is a screenshot from an example program I made that can be found in the Code Snippets forum. The thread is called "Explosion and Special Effects Demo" or something like that... It includes media also, so you should be able to figure it out. This is also how I did the explosions in Firewall.

Just ask if you don't understand anything. Good Luck

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 24th Mar 2004 06:48
Ssssshhhhhhhh!!!! There's money in it for you if you keep quiet r_kabouter .
I find no loss of dignity in figuring out everybody else's problems when you're stuck with your own .

But whoa! I really owe you money now r_kabouter, in addition to keeping quiet about the whack job, I didn't know that .png files were smaller than .bmps and still retained the quality, thanks!

@andrew You'll notice if you look at Bolt's explosion demo that a lot of the good looking explosions in videogames are animated textured planes, I even saw a bunch in Super Smash Bros Melee, it was the greatest moment.

BTW Bolt, congratulations getting into the TGC newsletter, probably the best part about Firewall is the explosions in slow-mo; great game.

Was that too long?

Crazy Donut Productions
Current Project: KillZone
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 24th Mar 2004 14:47
@ Bolt. Thanks, I'll check it out when I get off work (doesn't that always get in the way of programming?!?) BTW, IMPRESSIVE game you've got there in Firewall.

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 24th Mar 2004 23:13
@ Bolt. I'm looking at using the explosion code in conjunction with object collision. (i know most don't like it, but it suits the needs of my simple game i'm playing with) and I have the explosions the way I want them (size, no shockwave, etc), but what I'd like to do is whenever there's a collision, call up the explosion code via a gosub and have the code execute the explosion routine where the collision occured for an object. Do you have any suggestions?

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 24th Mar 2004 23:30
Nevermind. I figured it out. Thanks bolt!

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 24th Mar 2004 23:53
Well, I thought I had it. I've got two spheres on the screen. one controlled by the arrow keys and the other fixed. If they collide then the explosion occurs, but it doesn't do it but once regardless how many times the two spheres collide. I've attached the code. If someone could take a look at it and tell me what I'm missing, I'd appreciate it..

P.S. I know the "ships" are all in the same place. I'm just trying to get the collision/explosion part working right...

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 25th Mar 2004 06:23
Well, I can't run the code at the moment, but here is what I found:

`control ships
for a=1 to numship
`if collision, blow it up
if object collision(99,0)=a then play sound 1+rnd(5):shipalive(a)=0:gosub findex
next a

In this part of the code you use the command/expression:
"object collision (99,0)=a"
I believe it should be more something like this:
"object collision (99,a)=1

I think that will fix your problem. Good Luck, I hope it fixes your problem.

ps: you should also consider using collision with defined collision boxes, not the standard polygon collision. I understand you probably just didn't get around to it yet, just a tip

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 25th Mar 2004 17:06
I find it easier to create an animation of the object exploding, then To append it, just Like when it walks.

stann65
21
Years of Service
User Offline
Joined: 3rd Feb 2004
Location: england
Posted: 25th Mar 2004 20:03
why don't u use ExGen and then import wot u make into your game.

Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 26th Mar 2004 02:58
Quote: "why don't u use ExGen and then import wot u make into your game."


Because you have to pay for it. You can just take a screen cap of some movie, then photoshop one of the explosions, then that's you effect, just adjust the scaling and stuff to make an animated one.


"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 26th Mar 2004 05:33
A cool way to have it would be to have a function, or maybe more than one, that makes explosions of various sizes and effects based upon the parameters you pass to the explosion function(s). That would be useful for the instance of say, a gas barrel. Have on model of it just there, then another of it half broken and charred. When the player shoots it replace the normal model with the char-broiled one and put an explosion where the barrel is.

Crazy Donut Productions
Current Project: KillZone
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 29th Mar 2004 17:11
@ Bolt. Sorry for the late reply, been down with a stomach virus. I think that will fix it. Once I get back to 100% I'll give it a try...Thanks again!

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 30th Mar 2004 20:27
@ Bolt: the code you suggested changing does increase the "hits", but it still doesn't explode on every impact between the spheres. here's what you had me change:

I believe it should be more something like this:
object collision (99,a)=1

I've attached the "revised" code below. thanks!

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 30th Mar 2004 20:32
I think the code as is will do what I was aiming for. Bolt, you mentioned 'defined' collision boxes before, can you go in to more detail? I've never done that before....

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!

Login to post a reply

Server time is: 2025-05-23 04:00:26
Your offset time is: 2025-05-23 04:00:26