Join Joseph Labrecque for an in-depth discussion in this video Building the world, part of HTML5 Game Development with Phaser.
…With our gamestate created,…we can now go about populating the world with various game elements.…We're going to create a function to build out these elements in an ordered way,…starting with our background imagery.…So let's move over to our preloader.js because we need to preload both the sky,…and the hill image assets, so that we can use them within our game state.…So, to do that, we say, this.load.image.…And here, we can give the hill an identifier in the form of a string.…
So we'll just call it hill.…And we'll reference images/hill.png.…We'll do the same thing for the sky.…So this.load.image.…We'll use an identifier of sky.…And we'll instruct phaser to load in the file located at images/sky.png.…With these two images loaded, we can now use them within our game state.…Within our create function, we're going to invoke a new function called buildWorld.…
BuildWorld is a function that helps us to modularize what going on in our…game state, since there is quite a bit going on here.…To actually create this, we simply say, buildWorld: function.…
- 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?
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.