Join Joseph Labrecque for an in-depth discussion in this video Particles and emitters, part of HTML5 Game Development with Phaser.
We have all of the basic elements of our game in place.…A game world, a set of bunnies which hop around the screen, and…a number of space rocks which are hurtling toward the poor creatures.…It is the player's job to defend these creatures from the approaching cataclysm.…We will do this by allowing the player to cause defensive explosions through click…or touch input.…So the first thing we need to do is actually pre-load the image that will be…used for our particles.…To do this we go to preloader.js and inside of our preload function…we'll say this.load.image and for an identifier we'll…call this explosion and the image we'll use is located at images/explosion.ping.…
All right, moving back into game js and immediately under where we declare…space group, we're going to declare something new called this.first.…This is going to be our emitter.…It's going to emit different particles based on that explosion image we…just created.…Inside the buildWorld, let's invoke a, new function called this.buildEmitter.…For buildEmitter itself I've copied some code, from the snippets.…
- Downloading the Phaser framework
- Creating your first Phaser project
- Building the preloader and menu states
- Creating and spawning entities
- Working with particles and emitters
- Detecting and handling collisions
- Detecting "game over"
- Adding sound effects and text
- Preparing for mobile deployment
Skill Level Beginner
1. Setting Up Phaser
2. Configuring Loaders and States
3. Populating the World
5. Wrapping Things Up
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.