Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
So we now have our major gameplay and our game created, but you'll notice that obviously when we shoot a bullet and it hits an alien, well nothing happens, they both just disappear. It's not exactly the most thrilling gameplay ever. So now, we want to include particle effects, like I mentioned when we downloaded the Starling framework, the particle features actually an extension. We've already incorporated that into our source code. But now the question is how do we create these particle effects? Well I am going to show you a tool that's Mac only that's called ParticleDesigner and we downloaded that when we were setting up our system.
And this is not a free tool, so you can see I am using just the trial version here, so it says unregistered. But this allows you to visually create particle effects. So this tool is geared for iOS development. That's why you're seeing things displayed here in an iPhone. But with this particle thing, I can drag it around to see the effects of these particles. But most importantly, there is a huge library of user-submitted particles that I can check out. So I can just click on one of these to see how these particle effects look.
Now one thing to note is when you use these in Starling, they may look slightly different, and that's because of the way in which Starling is doing things. It's not an exact duplicate, but you can get pretty close by doing this. So you can use your own images for particles, like here is one of these like falling rocks. Let me just go to a couple of more of these. So here is a lava flow; really, really cool stuff. Now the real thing is that you can then edit these. So let's say I use this particle here.
I can go to Emitter Config, and then this allows me to adjust all of these properties to change how the particle effect is actually going to look. So let's say I wanted to change the gravity. I could come down to Gravity y and change it, so it's a different gravity. Now all of these, or most of these properties, can be adjusted in Starling at run time, so say you wanted to have an effect where the particle effect was actually changing over time, you can absolutely do that. And here you can see the texture that's being used on this particular effect.
But again, being able to have one of these existing particles as kind of a starting point for you is a really cool thing. Now when you want to save these, first of all in the unregistered version, it's not going to let you. But if we look at the particles that I've included in the assets, we can see we have this explosion.pex file, and that's the file that you export from ParticleDesigner. But then you also export a PNG which is the actual particle, and this is what the particle looks like.
And remember, this is actually a part of our texture atlas now. But if I look at this file, I am going to look at it just in the Text Editor, we can see that it's just an XML file. So you can actually come in here and adjust these things in the XML or you can actually do it at run time in Starling. Now I did want to show you one other tool which is really nice. This is actually a web-based tool created by One by One Design. So if you go to onebyonedesign.com/flash/ particleeditor, this is a similar type of editor, but this is actually now displaying this in Starling.
So this is actually built in Starling right here. So you are going to get an exact representation of how things look. Now another thing is that you can actually load in particles that you built in ParticleDesigner. You can change the texture of the background here. So I can adjust these values. So let's say I wanted to reduce the number of particles that I am using, and that's an important thing. And when it comes to performance, you want to make sure you are not using way more particles than you need. Often times, you can get away with lot smaller number of particles, and achieve the same effect.
So here I can change, let's say, the gravity of this. We can see that as I adjust these, things change. I can change the blending, the color values. So let's say I wanted to adjust the color of this, well that changes the alpha. So maybe I want to make these blue, a more purple effect, you can see things are changing. Another thing to be aware of with ParticleDesigner is that it uses a different coordinate system. So let's take this example. This would actually be flipped in Starling.
So the Y is actually flipped when we are in Starling. So if you are going to be designing particle effects in ParticleDesigner, make sure that you are aware of that, and you actually reverse things in ParticleDesigner so that they work. So in conjunction with these two tools, you can create just an incredible array of really nice particle effects that perform really well. So in the next movie, I am going to show you how to incorporate the particle effects that I've provided for you into our game.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 105465 Viewers
56 Video lessons · 117145 Viewers
71 Video lessons · 86370 Viewers
131 Video lessons · 41282 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.