Video Thumbnail

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

UNLOCK LESSON

Premium Features

Download Video

Fireflower shoot sprite

Right now, when we shoot, a fireball comes out of Mario, but we're not entirely sure from where (kinda sus). It makes a lot of sense in this case to add a shoot sprite so that when Mario shoots, we know that he's in the middle of an action.

Here we'll import our sprites using our new images.js file, and we'll also learn how to do a frame hold so that we only activate our sprite for a limited period of time.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
E
ERICKDLT554 posted 2 years ago

Hi Chris, how would the final index.html code look so that everything is linked correctly?

0
webuxmotion posted 3 years ago

Just finished the game!

You can play here https://flourishing-piroshki-722610.netlify.app/

0
j
justkoding posted 2 years ago

hey, how do you get this quick loading of your assets ?

0
Galaxy159 posted 3 years ago

Hey Chris, just finished this, Thanks for the great tutorial!

1
g
gealgome posted 2 years ago

yo can u send the full code of the game to me?

0
p
patoaltaco posted 3 years ago

Hi Crhis,

Im Im uplaoding the content of the src folder to my server to try it online but is not working, what content should be upload?

0
p
patoaltaco posted 3 years ago

So I uploaded the dist folder and its working, problem is that takes to much time to load and its doing it on weird way, is there a way to implement a loader?

0
K
Kshitiz posted 4 years ago

Hey Chris, getting some problems on the deployment part because when I uploaded t to netlify while transitioning to level 2 it is taking some time to load and the music is also mixing up.

Can you help me in this , thanks in advance.

0
chris posted 4 years ago

For sure can help! Could you send me your Netlify link and a link to your source code if possible? I'm thinking a load screen and or image optimization might be able to help quite a bit with this.

0
V
Vyju posted 4 years ago

Hey can u tell me what u gave for basic directory, publish directory & run command on netlify?

0
v
vialware posted 4 years ago

I can't seem to download episode 9 and 16

0
chris posted 4 years ago

Go ahead and give them another go - they were set to play on open rather than download originally it seems.

1
Angelina posted 4 years ago

how is this design pattern called? is this mvc or smth?

0
chris posted 4 years ago

Not sure if it has a name, but it does have similarities to MVC as some of the data is being stored in separate files (audio.js and images.js), then that data is used to produce visible sprites on that frontend which would represent the view.

My main process for game design is to create classes for my game objects, then create sections for initializing the game, animating it, then watching for events. I feel that as long as you follow those steps, you're going to be golden for any game dev in the future 👍

1
Angelina posted 4 years ago

Thanks for your answer!

I also want to add a score to the game and to upload my own font but I can't do it via @font-face. And I don't really understand how CORS works, could you tell me what to do? Thank you in advance

0
chris posted 4 years ago

So you'd want to move the font file into your project directory so you can reference it from there and don't have to make a CORS request (basically a JS request to another website).

For fonts, I'd recommend checking out Google Fonts since they have a ton of great, free fonts and make integration into your website super simple. Basically, you select the font you want by clicking a font's "Select this style" text. Then, the site will provide you with some code that you can just drop into your site's <head> tag, allowing you to use the font directly within your CSS.

Here's an example of what Google provides:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap" rel="stylesheet">

And to use this in your CSS you'd do so with:

font-family: 'Open Sans', sans-serif;
1
Angelina posted 4 years ago

Got it! Thanks again!!

1

Providing the lift to launch your development career

© 2026 Chris Courses. All rights reserved.