Friday, September 27, 2013

Indie Game Sneak Peek

Hey everyone!  I just wanted to tell you that we're going to be taking part in the Indie Game Sneak Peek tomorrow where we show off the games that we're working on.  Of course, we're not going to be the only ones!  There are going to be at least 6 teams showing up, and they're all going to be showing games.  We're going to be showing Siphon Spirit, an as-yet-unrevealed game, and while we're at it I might also show some March to the Moon and Japanese Arena.

All the details can be found right here.  Hope to see you there!

Thursday, September 12, 2013

How to make a Siphon Spirit orb

When we first started working on Siphon Spirit we needed a way to show how much energy an orb had.  We decided to make it as a bunch of particles that would circle the core of the orb.  This led me to my first problem.  How was I going to modify the particles' position so that they went in a circle?  The answer was Trigonometry.
Pictured: Trig in action
Trigonometry?  Isn't that the thing that they made me learn in school for some reason but never showed me how it could actually be useful?  Yeah, that thing.  Since I never saw a use for it and it was just something I had to do for a required class I just remembered it long enough to take the test.

When I needed to modify the position of the orb I needed to change it's X and Y values.  In order to get a circle, I had to use both sin and cos.  

X = cos(t); Y = sin(t)

That's the (extremely) basic formula for a circle.  We need something to be the t variable.  We need something that will constantly and smoothly increase in size so that it continues along the Sine Wave.  Without an increasing number, the orb would just stay in the same place.  Time is a great tool for that, since it's always progressing. 

X = cos(time); Y = sin(time)

This is a step in the right direction, but it still needs work.  Not only is it going in little tiny circles, it's circling the 0,0 position on the screen instead of where the orb is!  Let's handle it not being in the correct position first.  When I make the particle, I can tell it what the position of its parent orb is.  Since X and Y are already being taken for the position of the specific particle, I'm using J and K for the X and Y of the parent orb.  We add those positions to the formula so that the particle will rotate around the center of the parent orb.

X = cos(time) + J; Y = sin(time) + K

That's better, but the more particles we add to an orb we see that they are all focused at the very center.  We need it to spread out so the whole thing is filled with particles.  For doing this, I decided to use the radius of the parent orb.  This helps make sure that the particles never go flying out of where the boundaries of the orb are, and that as the orb gets bigger the particles don't keep filling up at the center.  I do randomize it a bit so that the particles aren't all completely uniform.

X = radius * cos(time) + J; Y = radius * sin(time) + K

This gives us our final formula for updating the particles as they move around.  Mostly.  I also give each particle a randomized velocity (movement speed) based on the radius so that that's also not moving uniformly.  The velocity modifies the time to either make it faster or slower than other particles.  I also randomize how big each particle will be.  The effect that I want is that it's a flowing, living piece of magical energy.  Controlled entirely by trigonometry and a little bit of randomness.

So for all those like me who just couldn't see why anyone would care to learn trig, take another look at the orb below.  I couldn't have made it without trig.

Thanks, math!
Want to see the orbs in action?  Give the alpha demo of Siphon Spirit a try!  (Currently only for Windows.)

Wednesday, September 4, 2013

Re-Designing Combat

Last week, my two best friends told me that they wanted to learn Japanese.  On the same day.  Within 10 minutes of each other.  They know of each other but I don't think they've ever met.  My first thought was annoyance that I didn't have Japanese Arena: Kana far enough along to be really useful to them.  Instead I spent some time answering questions and giving some advice.  A few days later I found myself outside staining the porch.  For some reason I decided not to listen to music, but to just do it all quietly.  Drove me nuts after a little while so I started thinking about Japanese Arena.

Suddenly I had an epiphany.  The combat was no good.  I had already been thinking about that when I watched my cousin play it a few weeks ago and saw that the fight was over after a few questions.  It didn't make for much of a review.  So I started to think about how to make it better.  After a bit of thought I went back to my two main goals for the game.

  1. Make it so that the user will learn how to read and write Hiragana and Katakana.
  2. Keep the users interest to help them complete the game and accomplish point 1.

The more I thought about it, the more I realized that the current battle system wasn't really fitting that.  As it is, you can level up your character and boost their stats so you do more damage.  Aside from me liking RPGs, why was this even here?  Just so that I could take on harder monsters which really aren't that much harder because I've boosted some numbers?  That just seemed wrong.  Then I remembered the excuse I give in the game for the player to be fighting monsters in an arena.

"Knowledge is Power"

That was it.  I don't need to level them up.  I don't need any stats at all.  All damage is based off of how quickly and correctly they answer questions.  If you don't know the stuff covered in the lesson, you're going to lose.  If you have a grasp on it, you're going to have a chance.  If you know it really well, you'll take the enemy down in no time.  The smarter you are, the more powerful you are.

This required a change for the weapons and armor.  Before they would just boost your stats.  Now there aren't any stats for them to boost!  All of the questions are split into Attack questions (where you attack the enemy) and Defense questions (where the enemy is attacking you).  Different weapons will give boosts to Attack questions, while different armor will give boosts to Defense questions.  Some of the boosts I'm thinking of are: bonus to available time to answer the question, chance for a critical hit, chance for a wrong answer to be shown as wrong, etc.

Looking forward to when I can get back to work on this!