Wednesday, November 11, 2015

Player Health

I'm currently working on the UI programming for the game. Right now, I'm creating a canvas and writing the script for the health bar. Displaying the bar itself was no problem at all, however writing a script for the health bar is another issue. So far, I didn't encounter any errors but the character's health isn't decreasing for every damage that is taken. I will make adjustments to the health bar as soon as I fix the script. The health bar is located at the bottom left of the image below.


Monday, November 9, 2015

Sound Update

  • This week I will be taking a short break from the music and focusing on some of the sound effects. I will be using mixcraft to record the sounds. The sounds that I will be working on is the tumbleweed, pause sound, and bounce sound.
This week I was tasked with continuing to work on the assets for level two. I finished the tumble weed for the desert and have been working on the trees for the foreground. The next thing to do would be to implement the tumbleweed into unity and have it roll.












These are the some of the other tree assets for the same level.

Friday, November 6, 2015

Exploding Crate Scripting

I just finished writing the scripts for the exploding crates that will appear in our game. The crates now explode when hit with Rana's fireball, set off other exploding crates that are near, and exert force on other objects in the area. I tried many different things before I was finally able to get it to work properly.

I started off, adding to the exploding crate, a child object with a disabled circle collider. My theory was, when the crate was struck but the fireball the child would activate and then trigger the same reaction in surrounding exploding crates, but for some reason the collider from the child wouldn't interact with the surrounding crates, even though the collider touched the colliders from the surrounding crates.

Next I created a prefab that was a completely seperate object with a circle collider acting as a trigger. I scripted the exploding crate to instantiate this object (which I called explosion) upon getting struck by the fireball and it worked exactly as I needed it to. Afterward I added, to the explosion object, a script that waited a very short amount of time before removing the object from the scene to reduce objects the engine needs to track at runtime.

The next big challenge was exerting explosive force on the objects around the crate. There is an AddExplosiveForce physics effect in Unity but it only works for 3D objects, colliders, and rigidbodies. Since 3D and 2D objects don't interact with each other in Unity, I tried to find a way to trigger 3D effects on 3D objects with a 2D trigger (the fireball). I did something similar to what I tried before by attaching a child, with 2D elements, that would then activate the scripts on the parent object but this failed as well.

I took to the internet and quickly found a free asset on the Unity Asset store for AddExplosiveForce2D, developed by Ananda Gupta at http://anandagupta.com. Thank you Ananda! The script was the effect I needed but the example contained within only worked on mouse click. I was able to move the key method from Ananda's script (Thanks again!) and attach it to my crate but for some reason it still wasn't working. I could hit the crate with a fireball and it would be removed from the scene but it wouldn't exert force on the objects around it.

I moved the epicenter of the explosive force and discovered that the explosive force was only interacting with the object itself and not the surrounding objects. Again, to the internet! I quickly found that you can use Physics.2D.OverlapCircleAll to create an array of the objects within a radius. By adding a layer mask I was able to make sure the explosive force would only effect the objects I intended it to. Adding in a quick while loop, I was able to iterate through the array and add the explosive force to each of the surrounding objects, using the initial object as the epicenter of force. By adding a call to this function right after the call to instantiate the explosion object, I can chain the explosive physics effect as well.

In order to simpify things I tried to create a single method that would test the objects in the radius to see if they were explosive crates before adding force to them. This way I could get rid of the explosive object altogether. Unfortunately, each time I tested this singular method, the program threw a stack overflow exception. But that's ok, because I have something that works exactly how I want and cleans up after itself. There's a couple screenshots below where you can see the explosive crates in action.

-Brandon



Music & Audio Update

As of right now I am trying to create an entire new song for the village level. This time I will try to implement more of the metal genre to it.

Thursday, November 5, 2015

Backgrounds and Midgrounds


Here are the Background and Midground layers of Level 1, Sakaduuba Village.  The building layer is comprised of a combination of the level ground buildings and floor pieces.  This layer was then desaturated from the original images, so that it did not overpower and clash with the main level ground layer and the characters.


Here are the layers, including the main  ground layers, for Level 2, Desert Night.  The original plan was to make the color scheme in all blues and violets, just like the far background dunes.  After piecing everything together, it seemed like all the layers blended to the point where it became difficult to tell which layer was which.  To alleviate this problem, I recreated each layer to have its own unique color that still coordinated and complimented the others. 

Cheers,

Jillian Walker

Levels Finalized

I finalized each design for levels two and three of the game. After looking back at the prototypes, I made some modifications to the designs and added a few obstacles to make them look challenging when the game is played.