Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

UNLOCK LESSON

Premium Features

Download Video

Ghost Sprites

Published a year ago

A sprite is a sequence of images contained inside of one singular image. They're used to create animations and to reduce a game's overall load time by decreasing the total amount of requests made to a server.

An animation can be created with canvas's c.drawImage(this.image) method. This method can not only be set to load in an image, but also to crop the image and cycle through the various frames you might have within a sprite.

Here I'll show you how to utilize this method to its full potential, rendering out four separate ghosts onto our map and having them animate in correspondence to all monitors' refresh rates.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
s
samman posted 6 months ago
0

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.