Thursday 16 January 2020

Stencyl Day 3

Time to finish the space invaders game! It's time to fully set up the game. I got ahead of myself last time with all the ship and actors code. They have events and actions, but now we need to put them somewhere. With sound effects, scene code, and a custom font, it's all coming together!



In the game there are two main sounds, both of which are provided for you. There's the spacey music, and the explosion sound. The spacey music is generic and supposed to play the entire length of the game. The explosion is a sound effect, and only plays in the event of a certain action. That creates an important distinction; sound effect, versus music.
I made the mistake of initially making the explosion another music setting. Do not do that, it will not work and you will be confused and you will spend ten minute trying to figure out what you did wrong.

Now that the music is ready, it's time for the most important part; the scene. The actual backbone of the game. The place where all the code and actors come together the make pixels move.


To start, create a new scene. Keep the default setting, since the pack for the tutorial is designed to work with that. The settings need to change if you're making a mobile game, or something that's bigger than a tiny window in the corner of the screen.

Now add the space background. I ran into a bit of a problem at this point, with the background, and the scene, and the scale.
All my actors turned out to be tiny, once uploaded. I tried to figure out why, tried to adjust the scale and everything, but nothing worked. It was frustrating because now my game doesn't look very pretty, and it's super hard to play.
Note to self when you're making your own game, check the sizes.

See, I've placed the actors in my scene, but can you tell? No, because they're freaking TINY!
Ok, I'm done.
In order to get the scene to behave, you need to add code. Thankfully, at this point the actors code is already there, so it's time to manipulate it and fit the scene.


At this point it may seem like I know what I'm talking about, but I really don't.

The object of the game is to shoot the evil space ships out of the sky. It's kind of mean, when you think about it, since the evil ships aren't shooting at you or anything, but the game just assumes they're evil. Have you ever asked how the evil space ship feels?

Anyways, in order to make that look cool you need the ships to explode. You need effects, you need sound, you need PIZZAZ! Also, you need a lovely font of words to show up at the top of the screen when you win. You just need it.

To make your font, just create a new font, call it default font, and set it up how you want. Again, the size is the most important, maybe in the 30s. I tried to give mine a cool gradient but it didn't really show up in the final product.


No comments:

Post a Comment