Monday, November 18, 2013

Shots and Particles

Greetings everyone, I am Khoa.  Like Kyle, I am not actually enrolled in the class and am more of contract worker.  My role so far is to program the various shots and bullets used by both player and enemies.

Information: From and To Where
So imagine shooting a bullet and said bullet hitting an enemy and said enemy takes damage.  Simple, no?  To make it more complex, imagine two more bullet types, one which will hurt the enemy more, and one that will make the enemy more aggressive but will not deal any damage.  Now imagine multiple enemy types which will be affected differently depending on the bullet type.

There are two ways of approaching this issue:
- Have each bullet check which enemy/object it struck.
- Have each enemy/object check which bullet type struck it.

Both are equally valid and depends on how the coding structure have been set up as well as how many of each type there are.

For Bala, we decided for each bullet to pass relevant information to the enemy/object it struck.  There are several reasons for this, two of which are:

- The main bullet controller, from which specific bullets will be derived from, had been set up to pass information to the enemy/object
- The development is progressing to a point where it seems there will be more enemy/object types than bullet types

The first reason is fairly obvious.  If the bullets can already pass information downstream to the objects, why not pass the type of bullet down as well, instead of having the bullet figure out what it just hit.

The second reason lightens the amount of script that has to be generated and lightens the amount that has to be processed.  There will be more bullets than enemies, especially including the player's own bullets, that if every bullet has to do needless calculations, performance will needlessly suffer.  Supposing there were four types of bullets and twenty types of enemies.  An enemy controller script going through four types of bullets is much faster than a bullet controller script going through twenty types of enemies.

Here is a small map of how each bullet type is extended from the main controller.


Simple, and each type is responsible for turning on their particles.  We have also been planning on allowing the player to upgrade their bullets, so extending their methods would be easier and cleaner.

Here is an example of the water shot checking what it hit.


So if we add more enemies, we would have to update this script repeatedly.

Instead, here is what it should look like.


And in the enemy script, such as the Fire Demon:


This allows for the Fire Demon to check just which type of bullet struck it and react accordingly.
We cut down on the amount of information that has to be re-written and checked.

So Bullets?
As noted in an earlier post, the player will get different types of bullets with different abilities:
- Knife: Standard damaging bullet
- Water: Good versus fire type enemies/fill holes/destroy some obstacles
- Wind: Push objects and enemies around/not damaging
- Shield: Blocks and reflects enemy shots

Since the knife is the standard shot, we'll take a look at it first.


The knife simply flies forward and if it hits an object that can take damage, it will pass how much damage to the object.  The damage calculation is determined by the object and so if an object is immune to the knife, it can be set to ignore the damage from the knife.  This keeps us from having to add more to the knife every time we create a new enemy type.

Water is a bit more interesting as it can be used to shrink down sugar cubes, deal damage to certain enemy types and raise water levels.



The particles themselves is not causing the cube to shrink, nor do they carry any of the logic that determines what happens when it collides with another object.  Like the knives, the actual shots are these spheres, the difference is that the spheres are not rendered.


They pass the "damage" and other relevant information to the objects which then processes what has to happen.

Now, why can't the particles themselves be used?  In a sense they can.  Unity particles can collide and pass messages based on those collisions.  In fact, an early example of the wind shot did just that.


In this early wind shot prototype, I wanted to see if I can replicate the wind bouncing off of walls and how the particles would flow.  However, I was not able to get very precise control of the particles.  By nature, wind moves randomly and so the particles did exactly what I told them to do.  Likewise, the wind is not only affected by the environment, but also by itself.  The movement of the particles is a bit more natural, but would be frustrating for a player to utilize.

Instead, we went back to the more streamlined shots we had before.  The wind shot works in almost exactly the same way as the water shot.




Now if you notice, while the spheres are being instantiated just like the knives, the particles themselves extend forward from the player.  This is done by toggling the particle systems on and off which spray the particles forward in the direction the player is currently looking and not by instantiating the particle systems.

This is the other reason not to use the particles themselves for calculations.  To get the spiraling wind, I overlay two sets of particles, each set containing four streams.  That said, none of them are going to hit anything in the center of the cone, which realistically makes sense since it would be the eye of the storm, but in game would seem awkward since that would be where the force would be expected to be strongest.  No to mention, to create the streams, I use more particles which means more collisions, more processing that needs to be calculated, and it would be a nightmare for everyone involved to determine how many collisions are needed to kill a single enemy.

And now for something, somewhat different.  The shield is not a bullet in the same sense that the others are.  It instead blocks shots and repels them.  It will always face the same direction as the player is facing.  Like the cone of wind, it always exists and does not need to be instantiated every time.


That's all for now, folks.  This quarter is coming to a close and afterwords will be a postmortem on whether or not we achieved our targets.  It will also address what's going to happen next and where Bala is heading.  Until then.

Saturday, November 16, 2013

Art Production Update!

Hey Guys!

This is Hank. I am one in the trio of artisans working on Bala. More specifically i am the Lead Character artist and general quality control in terms of production assets. However, while we are in this pre-production stage that is this first 10 weeks of development I have been trying to help out with the concept stage.

In this post I will be discussing the different enemy concepts the the team and I have been working on this quarter and explaining them one by one is detail. Since the enemy variety is at the core of the gameplay, the enemies themselves are an integral part of what makes Bala what it is.

Booty Paladin

The paladin is a large horse/ape hybrid that has a very large baboon butt- his only weakness. He cannot be defeated by any means other than attacking the rear. The most finalized of the designs, booty paladin holds a large hammer with a personality. As in, the hammer has a face the reacts to its surroundings and garbles in disapproval.  He has a hard time hitting Dream Witch, but flattens her if she falls into his sights.





Mieosis

Having been seen once before in Kyle's post, Mieosis is a candle
creature who is an angry nuisance that charges Dream Witch any chance it gets. Although easy to 'kill' Mieosis splits into smaller versions of itself over and over again as it takes damage, each version fast and smaller than before. In greater numbers is where Mieosis' true strength lies.


Wizard Cat


First of the cat duo, Wizard cat is a strange dancing crazy-eyes cat in a makeshift wizard robe and hat. He shoots magical balls of energy from its tail as it dances the dance- never stopping. They are easy to kill in theory, but their erratic moving thanks to their dance of death makes them a tougher target to nail.



Scuba Cat



The Wizard Cat's better half, the Scuba Cat loves to swim. Of course, like any responsible kitten, he takes all the safety precautions that come with swimming in deep water and wears his full scuba attire. He snorkels around the player in the water and only ever comes up for air and to take a shot at Dream Witch. Unlike his dancing counterpart, Scuba cat uses his water environment to avoid all of dream witches attack and thus is very hard to hit.




Puppeteer

Seemingly just a puppet, this limp sack of stuffing flip flops around with a blank expression. The true nemesis lies in the shadows and is a big large one-eyed hand that controls the sack from afar. If the player were to fall under the puppeteer's spell then they'd notice strange fourth-wall-breaking differences occurring in the gameplay, such as the controls being reversed for the player. Luckily the puppeteer is easy to beat once you can conquer his trick, but be careful when he lurks with larger numbers of enemies.




Reflecto



Reflecto is a sad being whose personality lies entirely in his mask. He has the ability to both separate his mask/face in half to avoid attacks and take shots of his own. The only way to defeat Reflecto is to use the shield to bounce his own (very strong) bullet back at Dream Witch.



Fire Demon

The most hazardous of the bunch so far, Fire Demon (or Fire Baby as we call it sometimes) is a reckless enemy the randomly travels in every direction sporadically. Because he can only we killed with water the player has to get in close, but be careful as to not get burned. The smaller he gets from taking water damage the faster he becomes, making him very deadly. And be careful not to use wind on him, as he becomes huge. Though experienced players may use this to their advantage  to make the Demon slower.



Bonus!:

The first environment (the Forest) is well under way for both concept and asset production, but we'll have to save that reveal for a later date.

Until then keep following the project and if you want to check out my personal blog and learn more about me personally and what else I'm working on at hanksilmanmedia.blogspot.com

Friday, November 8, 2013

This Ain't No Place for No Hero...

This ain't no place for no hero
This ain't no place for the better man...
This ain't no place for no hero
to call home...



Allow me to reintroduce myself…the name is Dave! David Houston and I’m fresh out the frying pan and into the fire…okay not really, just got a little carried away with my Jay-Z reference -_-; Anywho, as Kyle alluded to in the last post, this week is my turn to handle the group project blog. So strap yourself in kiddies, as I tell a wonderful tale of team work and comradely and basically what it is that I’ve been doing on this project thus far!

*Ahem* Now, considering that Angelica and myself are the only two actually enrolled, we are tasked with being Project Manager and Assistant Project Manager (the latter being myself). But everybody contributes a great deal to the concepts and creations that go into Bala! And that’s awesome because the others are terribly talented and I can’t sing their praises enough. So give a nice round of applause for my group mates if you’re in a position to do so without making yourself look like an abject moron for breaking into a slow clap at your computer!  I also act as a Concept Artist and Environment Artist, and all around utility guy! 

So far what I’ve been doing is mainly coming up with the look and behaviors of some of the baddies and babies that are in our game. It’s an interesting process to say the least, as I've been out there figuring out what is and what works at behest of the Overlord’s…err Angelica’s, will. So I guess, what I’ll  be showing you is some of my process and general thinking that goes into the enemy designs.


This is the tentatively named boss witch (all our enemy and character assets are named after what they are for the sake of reference, but we’ll call her BW for now), she is one of four established level bosses in the game (others coming soon!).The first thing I did was think about making a different feeling character than the dream witch without going so far into left field that she felt like she didn’t belong in the game. So I sat down and looked at the style guide that was established for our lead character and kind of picked through some of the clothes and looks that DW (dream witch) didn’t use.  Since DW has a lot of frilly things that give her a mildly gothic look, I felt her opposite should be wearing more form fitting sexy clothes (granted that thinking is a little rudimentary, but hey it gets the job done!). She also is physically different in her size, body type, and complexion. Where DW is thin and pale, BW is long, athletic, and dark. I wanted her to look powerful and intimidating; so she has a well-defined muscle structure. I tried not to go overboard with her muscle tone because I still wanted her to look feminine. 

Now that I established the differences, I needed a few linking similarities to make her look as if they belong in the same world. I didn’t want to abandon the gothic look that was established for DW, so I stayed in that vein somewhat with her clothes. I used the button down style dress top and pleated frill skirt. I also gave her a mask, much like DW’s cat mask as if to say in this world witches wear critter masks instead of pointy caps! It’s kind of a cool concept so I ran with it. I decided on a fox (though I could see someone calling it a bunny, I kind of went up and long with the ears), in part due the fact that foxes are thought to be cunning creature. I also thought it was humors to have the foxy bad guy wearing a fox mask…sometimes things really are that simple. BW’s mask is beat up however, as it has a broken ear and a large gash above the left eye. These are set in place to somewhat cement her standing as a bad ass and all around bad guy. We tend to link rugged to villainy, so I just felt like it worked. 


This also ties into her facial features and eyes. I attempted to give her a somewhat crazed look, as I imagined her personality to be unstable. Broken mask, broken mentality! I also gave a similar looking scar to DW’s to her; I just put it in a different place. The idea is that there could be a history or connection to scars and witches or at the very least between the boss witches and DW. This idea acts as a subtle vehicle for the characters and builds the narrative. I also gave her twin tails so that she had a cutesy like hair style to match the somewhat nightmarishly cute theme of the game.

The final thing I look at is what makes the character unique; or rather what can I do to make this character unique. Gimmicks aren’t just for wrestlers and bad fighting game characters folks, so I went down into my bag of tricks to see what I could dig out. Since BW looks like she could kick somebody’s ass hand to hand, I thought about giving her something that looks like it’s in the way of martial arts. I recently watched The Man with the Iron Fists on TV, so gauntlets where kind of stuck in my head. I went there and tried a few different styles until I landed on a pair of fire spitting demon gauntlets as her main weapon, and there you have it!

This is my process in a nut shell! I always refer back to the style guides and reference images to try and keep things consistent, and I try not to get too married to any one concept I create. I’ve had to go back several times to redesign enemies that don’t exactly fit or make sense. That can be hard to do, especially when you work so hard to bring something about. But that’s the nature of the beast! It’s a group project, so everybody has a piece of the say in getting it done!  So I’m constantly asking the team what they think or how they feel about certain aspects of the characters. And that’s fine by me, because it always helps to have fresh eyes on your work! 
    
Anyways, my time is up. I believe Hank is on deck and he’s bound to have all sorts of goodies that you folks can sink your teeth into next time, so look forward to it! Until then, stay classy interweb!!