• Home
  • About
  • Games
  • Tools
  • Books
  • Contact

21

Jul

Fireball and smoke explosion

Posted by admin  Published in Particles Permalinks

It’s been a while since I did a particle tutorial, but here’s a new one at last. I tried something different for this one. Instead of putting lots of screenshots in this post, I combined them into a video file and published it on Vimeo. I didn’t put in on Youtube since you can’t download the original video file there, wich can come in handy from time to time. As usual, this tutorial assumes you’re familiar with Torque and the particle editor.


Fireball and smoke explosion tutorial from Videogame Biscuit on Vimeo.

If the streaming video isn’t clear enough, you can download the original WMV file on the video page. Also available are the tutorials as OpenOffice.org Impress and Microsoft Powerpoint slideshows. And finally, you can download the particle effect file with the particle sprites.

  • View the video on Vimeo
  • Slideshow in OpenOffice.org Impress format
  • Slideshow in Microsoft Powerpoint format
  • Download the finished effect
empty

27

Jan

Laser beams

Posted by admin  Published in Particles Permalinks

As promised, here is the tutorial about creating laser beams with Torque Game Builder. The laser beam effect I created is different from the type you commonly see in games or movies. Instead of a spear-like beam, the entire beam appears at once. The only time I had ever seen something similar in another game was the Obelisk of Light in Command & Conquer. But let’s get started. First of all, the particle sprite. This is a pretty straightforward one, just a blurred white dot.

04_01.png

Create a new emitter, select the sprite and apply the following settings to the emitter:

04_02.png

Some explanation. The emitter type is set to LineY, wich means the particles are emitted along a vertical line. In all previous tutorials, this was a point. The aspect ratio is no longer fixed, so the particles can be stretched. This is necessary to make them overlap into a solid beam. Next, the graph properties.

04_03.png04_04.png

The particle life is set to 1. The quantity is a bit more complicated. For the first 0.25 seconds, 1000 particles per second are emitted, wich then drops to zero at 0.75 seconds. This creates a short particle burst.

04_05.png04_06.png04_07.png

The base sizes are set to 15 (X size) and 40 (Y size). The “Size Y Life” field is what turns the particles into a more or less solid beam. Over the course of the particle life, they get stretched vertically to three times their size. The Y-size goes from 1 to 3 in a second.
Ignore the fields for speed, spin, fixed force, random motion, emission force, emission angle and emission arc. These are all set to zero, making the particles stationary. Color settings are pretty simple. Red is set to 1.0 and both blue and green to 0.2.

04_08.png

And finally, the visibility. From 0 to 0.25 seconds, the effect is fully visible and then rapidly drops to zero. Experiment a bit with this to get the effect you want. If you make it fade away slower, the beam will have a more glowing effect.
The effect you have created now is aimed at a vertical size of 768 pixels. Changing the length of it will change the appearance, because more particles will be created in less space, making the beam look denser. This can be solved with a little bit of code:

%Emitter = %this.Laser.getEmitterObject(”Beam”);
%Emitter.selectGraph(”quantity_base”);
%Emitter.setValueScale(%this.Laser.getHeight()/768);

What happens here? The first line selects the particle emitter “Beam” in the particle effect “Laser”. Next, the graph “quantity_base” is selected. All the following operations on graph fields will now be applied to this graph. Finally, the ratio of the current height to the original height is calculated and the amount of particles is scaled accordingly. So, if the height of the beam is reduced by 50%, so will the amount of particles, and the beam will still look the same!

If you want to experiment with this yourself, you can download the effect and particle sprite.

empty

14

Dec

Explosion with sparks

Posted by admin  Published in Particles Permalinks

A while ago, I wrote a tutorial on how to create an explosion. Now, we’re gonna add a nice shower of sparks to the fireball. The starting point is the basic explosion from the previous tutorial, wich had one particle emitter for the fireball. Now, we’re gonna add a second emitter for the sparks. Here are the basic settings for the emitter:

03_01.png

And now for the particle graph settings. The idea is to eject a short burst of small, glowing particles. That’s what the following two settings do. The particle life is set to 1.8 seconds, and the emitter will emit 1000 particles per second for 0.07 seconds, creating a burst-effect.

03_02.png03_03.png

Next, the particle size. This doesn’t change over the course of the particle life, but there should be some variation. For this, the X size is set to 4 and the X variation is set to 3. Since a fixed aspect ration is used, it’s not necessary to set the Y size.

03_04.png03_05.png

The speed of the particles is set to 20, and the variation to 10. Like the size, it doesn’t change over the course of the particle life (not through the Speed Life field, at least).

03_06.png03_07.png

The next step gives the cloud of sparks a shower-like appearance. First, the sparks fly a bit upward and then they start falling down. This is done with the fixed force parameter, wich acts as some sort of gravity. The Fixed Force Base field is set to -2.5, wich makes the force act upwards. The Fixed Force Life is set to increase the force to 2 after 0.2 seconds, making it act downwards so the sparks start to fall.

03_08.png03_09.png

And finally, the color settings. Red is set to 1, blue to 0 and green fades from 0.7 to 0.5 over the course of the particle life, making the color change from yellow to orange. The visibility goes from 0.8 to 0.2, making the particles fade away towards the end.

03_10.png03_11.png

If you want to see what it looks like or experiment with it yourself, you can download the file containing the effect and particle sprite.

empty

3

Aug

Explosion tutorial

Posted by admin  Published in Particles Permalinks

I mentioned this a while ago, but here it finally is: a tutorial about explosions in Torque Game Builder. I’m gonna show you how to make a simple explosion with Torque’s particle engine. It will be only a fireball, no ejected fragments, sparks, plasma rings or anything like that. Just a very basic explosion.
We’re gonna start by creating a particle sprite. This will be the particle the explosion will be made of. For this, I used The Gimp. I created a 64×64 pixel image with a black background (used for viewability purposes, this will be removed later) and made a transparent layer on top of this. In this layer I drew the particle with the paintbrush. I used the ‘Galaxy, Small’ brush with an opacity of 50%. Next, I applied Gaussian Blur with a radius of five pixels and the black background layer is hidden. This image is saved as particle.png; it is very important to save it as a png file, since this format contains an alpha channel!

02_01.png02_02.png02_03.png

That’s it for the drawing part. Import particle.png into Torque Game Builder as a static sprite and create a new particle effect. This one uses only one emitter, so you can use the default one. Start by setting the effect mode to ‘CYCLE’ and the effect lifetime to 3 seconds. Next, open the emitter settings and make sure all checkboxes are unchecked, except ‘Fixed aspect’ and ‘Intense particles’. Select the particle image in the ‘Image’ field. The emitter should now start to emit a cloud of bright white particles. Doesn’t look like an explosion yet, though.
We start by specifying the number of particles. To get an explosion effect, the emitter should emit a short, intense burst of particles. For this, open the emitter graph editor and select ‘Quantity base’. Set the value axis to 0/50 and the time axis to 0/1, so it’s easier to set the right values. At 0 seconds, the emitter should emit 50 particles and at 1 second, this should be zero. This makes the emitter burst particles for 1 second.

02_04.png

The effect now looks like a ring of particles. In some cases this can be the desired effect, but not this time. We need a solid ball of flames. To achieve this effect, we need to adjust the particle speed settings. First of all, the base speed is set to one. This is just the base speed that’s used to calculate all other speeds. Speed variance is set to two. This makes sure not all particles move at the same speed. The third setting, speed life, is what makes the fireball come to life. I set the speed axis to 0/2 and the time axis to 0/1. You’ll need to play around with the graph a bit and see what the effect of different settings is.

02_05.png02_06.png02_07.png

We have now a pulsating explosion, but one thing is still missing: color! I used a white particle sprite so it’s easy to adjust the final color using the RGB graphs. In the emitter graph, there are three options named ‘Red color life’, ‘Green color life’ and ‘Blue color life’. First of all, set the blue color to 0. This will turn the explosion yellow. The red component will remain at 1. The key to turning it into a bright orange fireball wich will fade to red is the green component. This starts at 0.5 and drops to 0.2 after one second in this example.

02_08.png02_09.png02_10.png

And finally, to finish it, the visibility should drop to zero. This is done with the visibility life graph, wich drops from 1 at 0 seconds to 0 at 0.8 seconds.

02_11.png

To change the appearance of the explosion, you should experiment a bit with all the settings so you can see what the effect is. You can download the effect and image, so you can try it out for yourself.

empty

18

Jun

Plasmaball trail

Posted by admin  Published in Particles Permalinks

Yesterday I explained how I created the plasma balls that are used for the weapons. The ball itself is only half the job, it also needs a trail of glowing sparks! For that, I created a green glowing ball pretty much the same way I created the plasma ball. This time, however, the shape is circular, and the center is pure white.

01_011.png

For this tutorials, I assume that you have at least some basic knowledge of the Torque particle engine. I won’t be explaining the very basics such as creating an emitter and loading particle sprites. This effect has only one emitter, so I’m just gonna use the default emitter. To start, I did the following things with the emitter:

  • load the green particle for the image;
  • set type to POINT;
  • set orientation to FIXED;
  • uncheck all checkboxes, except “Fixed aspect”, “Intense particles” and “Rotate emission”

Next, I set all the emitter graph parameters. I’m just gonna put the screenshots of the things I changed here.

01_041.png 01_031.png 01_021.png
01_05.png 01_06.png 01_07.png
01_08.png 01_09.png 01_10.png
01_11.png 01_12.png 01_13.png
01_14.png

That’s it for the emitter. For the effect itself, mode should be set to INFINITE, wich means the effect keeps going, and “Use effect collisions” shouldn’t be checked. The result is a slow stream of bright green particles that slowly fades.
This effect is connected to the plasma ball sprite so it moves along with it. This is called “mounting” in Torque. I’m not gonna cover this in great detail, examples of this are in the Torque documentation. Because we checked “Rotate emission” in the emitter options, the direction of the particles is automatically adjusted to the direction of the plasma ball. The particles always move in the same direction as the projectile, but much slower, so they seem to follow it.

empty
  • feed
  • techorati
Videogame Biscuit at Blogged

Categories

  • Game Design (8)
  • Games (67)
    • Gridblaster (20)
    • Sub Commander (11)
    • Wasabi Defense (36)
  • Geek world (3)
  • Miscellanious (11)
  • Reviews (16)
    • Books (6)
    • Tools (10)
  • Tutorials (20)
    • Gimp (7)
    • Particles (5)
    • Torque (6)
    • Websites (2)

Archives

  • August 2008 (1)
  • July 2008 (7)
  • June 2008 (5)
  • May 2008 (6)
  • April 2008 (8)
  • March 2008 (8)
  • February 2008 (9)
  • January 2008 (11)
  • December 2007 (8)
  • November 2007 (4)
  • October 2007 (8)
  • September 2007 (9)
  • August 2007 (11)
  • July 2007 (12)
  • June 2007 (18)

Blogroll

  • 2D Boy
  • A digital Sailor’s Diary
  • Andrew Wooldridge dot com
  • Bottomless Pit Games
  • Game Focus
  • Game Matters
  • Game Producer
  • Gamedev Blog
  • Gamedev Mike
  • Gamedev Planet
  • Games From Within
  • Hex Studio
  • Indie Madness
  • Jacob Santos
  • Joshua Smyth
  • Lightworks Games
  • Lost Garden
  • Making Casual Games
  • Mr Phil makes games
  • Nerfbat
  • Psychochild’s Blog
  • Qatfish
  • Shotbeak Games
  • Starlit Sky Games
  • Steve Healy Games
  • Tales of the Rampant Coyote
  • Wiering Software

Recommended books

Meta

  • Log in
  • Main Entries Rss
  • Comments Rss
  • XFN Network
  • Wordpress

Sponsored by cheap web hosting || Swarovski Rhinestones || Funny Pictures

Videogame Biscuit is proudly powered by WordPress

Protected Under Creative Commons Licensed

Valid XHTML || Valid CSS || Feed me!