Cry Wolf - Android Game Dev, part 2

Part 1

Working on sound files today. Messing around with triggers for certain sound effects. I'm running into some problems with .wav files playing properly in the scene. I can't seem to get the background music to loop properly.

I download some sound files from www.freesound.org, it's a great resource, although I'm unsure how the licensing works. Luckily, many of the sounds from there are in wav format, so they'll work right away with the engine we're using.

Our artist, Nicole, just sent me the background assets, so I'll be focusing on implementing them into the scene. PNG is always the way to go.

Placing the assets unto the scene.
I simply replaced my placeholder assets with the ones Nicole sent me, now it's just a matter of scaling it. I resized the graphics and aligned them with the edges of the screen.
As of now, I'm basing collision off of the edges of the sprites themselves, but I'm planning to create an invisible object to act as a "catcher" later on.

Scaled and aligned, art by Nicole Frias
I messed around with Actuate and found a function to create a motionpath. This is actually really useful because I want the enemies to "hop", giving the player a small visual cue as to the timing of each enemy spawn. When the enemy spawns, it will follow 2 curves which I tried to align to the curvature of the hilly background.

MotionPaths are tricky as heck!
I also used Actuate.tween to alter the scaleX and scaleY of the enemies to increase to give the illusion of the enemies coming closer. As you can see in the above picture, I ran into a funny glitch. The wolf sprite is overlapping the sheep sprite, even if it's supposed to be behind. Because new enemies are added to the scene -later-, they are placed -above- the older sprites. First in, last out. All of the sprites are just piled on top of each other.

Hello arrays, my old friend.
After messing around with the code a bit, I found "addChildAt", which is a great function for slipping things into an array, and pushing everything on top of it forward by 1. By telling the array to add the child at "3", it buries it under those that were spawned before it.

It's a doggy conga line!

There we go! Everything working as intended! I also added a health system and a ~dynamic difficulty adjustment feature~. Which is just a silly way of saying that it ups the difficulty as you play.
I'll be leaving the project as is for now, and I'll be adding more features once I talk to my groupmates about the project.
Laters, potaters.



Comments

Popular Posts