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 / Best Way to make Special Effects

Author
Message
Teh Stone
16
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 15th Jul 2010 22:46
i need to make some kind of special effects for things such as laser beams, explosions, smoke. Has anyone got any suggests on how i would be able to make these i was kinda thinkin of textured plain but i dont know how to go any further than there,

Basically just asking ways to achieve these effects and if you could a simple example

Thanks in advance
Dark Dragon
19
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 15th Jul 2010 23:10
For explosions, i'd say use particles, but er.........do you mean 2d or 3d effects? methods differ greatly.

Teh Stone
16
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 15th Jul 2010 23:50
Thanks for the quick reply

it is 3D effects that im going to need, the only experience i have of particles is in Blender and i dont really know how they could make explosion is there a tutorial that anyone knows of about it or anyone who can explain or give me an example
Dia
21
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 16th Jul 2010 18:06
use the forum search.

there are a bunch of tutorials and one of the back issue newsletters has a great demo inc source code of making and using explosions

This is not the Sig you are looking for....
Teh Stone
16
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 19th Jul 2010 00:24
sorry havent been able to reply in the last few days been really busy, i did use the search but i couldnt find anythin useful thanks for the info about the newsletter i will try and find it
Dia
21
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 19th Jul 2010 13:52
Newsletter Issue 46 Here

This is not the Sig you are looking for....
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Jul 2010 17:47
Laser beams would be easy; just make a 3D cyliner (the fewer sides the better) of radius 0.01 and scale the height of the cylinder to do the distance. For explosions, you can use billboards with an animated texture and some ghosting for simple explosions. If you want particles, the best way to do that in DBP is to develop your own and use billboards for the particles themselves. The DBP built-in particles suck!

The fastest code is the code never written.
Teh Stone
16
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 19th Jul 2010 18:37
@Dia Thanks for the link i have downloaded it, it looks great and i will try it out later

@Hawkblood The game im making is a Top down Shooter so it wont have to be many sides at all, will it be best to use the cylinder as an actual bullet or should i use a different method for collicion like raycasting and then just use the textured cylinderfor the visuals?
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Jul 2010 18:55
If it's top-down you could simply use the line x,y,x2,y2,color command to make your lasers. Line is a 2D command, but there's a plugin for 3D lines that would work great if you have areas that would obscure part of the ray.
http://forum.thegamecreators.com/?m=forum_view&t=69221&b=5
As far as the explosions, I would use an animated sprite since the distance from camera to target is constant. Or use an animated billboard just above the target.

If you are doing a pure top-down, then ray casting may not be needed. Pure top-down's a 2D in nature and would not need to have meshes, just animated sprites. You can use a dummy sprite off screen to see if it hits a wall or a zombie. When you shoot, make a sprite with size 1,1 and loop as the sprite goes accross the screen. Test for collision with each obstacle and zombie sprite until it runs into something or goes off screen. When it hits/goes off screen, record the sprite location, then when you render, render the line command from your gun to the recorded location. That's if you want to make it in 2D.

The fastest code is the code never written.

Login to post a reply

Server time is: 2026-07-25 03:25:36
Your offset time is: 2026-07-25 03:25:36