Wednesday, December 24, 2014

Battle High 2 to Unity3D: Done

So after several months of work, the Unity3D port of Battle High 2 is done! The and Desura versions are both now and available for purchase and play:
Anyway, I wanted to use this time to explain some of the struggles and triumphs I made porting the game over from XNA to Unity3D. Do they even call it Unity3D anymore or just Unity? This isn't important, but I'm just going to refer to it as Unity for the rest of the post and I'm not referring to Assassin's Creed: Unity.

Why Even Do This?!

So I started porting Battle High 2 to Unity in July of 2013 I believe, which was also when I started writing my GameMaker book.  I wanted to port the game from XNA to Unity because XNA was a dying framework.  It still exists, but you can't really do much with besides make XBLIG games, another service not many people get much use out of, and PC games, which has various requirements such as Windows Media Player and the XNA distributable framework, which not everyone is willing to install.
So I decided on Unity because it's known for being portable to a variety of outlets:  web, mobile, pc, and even console.  There is varying amounts of work between these different platforms, but being able to is definitely a great aspect of this engine.  In addition, Unity is still being updated and worked on; with Unity 5.0 coming out soon, there will be new changes in the engine -- optimization, rendering, gameplay, etc.  All of these can improve future versions of the game -- or cause major headache.  For these reasons, I really wanted to port the game to Unity; however, my approaches were not the best.

 

Version:  Doing it all from Scratch

So I tried porting Battle High 2 three times.  The first time I was very confident and thought it'd be very easy, but the problem I already had the game done so rewriting everything from scratch became overly tedious and boring.  Though it was neat seeing the game against 3D backgrounds, trying to finish this was just going to take way too long.  Again, I was writing everything from scratch.  I'm not sure if it existed or not at the time, but I wrote my own sprite rendering system as opposed to Unity's SpriteRenderer class, which can take a part of a texture and renders it efficiently by making a special cutout mesh to avoid rendering unneeded transparent pixels which can cause slowdown.  At the same time, I became very enthralled with writing my GameMaker book, so I took an indefinite break and came back to the game several months later.

Version:  Doing 50% New

So after taking an extended break, I knew doing the game from scratch like I was was going to take too long, so this time around, I decided to use more assets from the original and use Unity's SpriteRenderer class but I still wanted to write all the code over.  This, like the previous version just became too tedious.  I also fell into a depression due to various things so that plus working on a major part of the game -- the code -- from scratch just felt too daunting, and I had to stop.

 

Version:  Direct from XNA

This third time I said to myself, "You know, XNA is C#, Unity uses C#, I'm going to do this more directly."  So I pretty much just copied my .cs files into Unity and stripped it of anything XNA -- and in some cases, commented it out.  This was the best thing to do; I'm only sad I didn't do this first as I would have saved so much time.  The version I just published on OUYA and Desura is really not Battle High 2 A+; it's not different enough to call it that yet.  Regardless, I'm happy that I was able to to finish and get it running in Unity.  I wrote some interesting code such as my own sprite packer; Unity has one, but I have too many sprites so it doesn't run properly, also, I run unique code to trim, remove duplicate, and convert sprites to Alpha8 for palettes.

Are there differences? 

Yes!  There are differences between this version and the original XBLIG version of Battle High 2.  Again, there aren't enough for me to confidentially say this is Battle High 2 A+, but enough to say there are different.
The biggest one is that the concept of Elemental Overdrives have been removed.  Michelle still has her -- I'll be honest -- Dark Phoenix form, but every other character's updated form is gone.  Will I ad them back in?  Possibly, but there will need to be extensive testing and balancing before I do.  Also Principal, the game's boss character, is unlocked from the start.  I also implemented reversals and throw breaks.

 

So what now?

Well now that this version is out, meeting my deadline of release before 2015, I'm going to take a break first and foremost.  As I was playing the game, making sure it worked, I definitely noticed a plethora of things for me to improve in future versions.
  • Hit box display in training mode still make no sense
  • The AI is idiotic at best, even at the highest difficulty
  • You can't choose to rematch after a versus fight is over
  • The UI looks dated
  • The control / input system could use some love
Fortunately, unlike the XNA version, updating and releasing new builds of this version shouldn't be as much as a hassle.  The real challenge will be finding the time and motivation to make changes.  There are also some big changes I want to make.

 

New Characters


The sprites above are of unfinished characters for Battle High 2.  I'd love to finish them, but I'm not sure if I'll be able to find time to do so, but adding them I think would be a great addition.  Of course, adding a new character is a lot of work and expense:  new code, new balancing, new voice acting, new stage artwork, new music.  A lot of new's, but it's a challenge I'd love to attempt but I feel like there are a lot more important things to fix first.

 

Challenge Hallway

Mortal Kombat IX probably had one of my favorite single player experiences in a fighting game.  The Challenge Tower was unique, difficult, and varied.  I want to do something similar with Battle High 2.  The modification system I made in the previous versions for the Elemental Overdrives would definitely help with such a task, but I also want unique challenges in the game such as breaking the car -- something I removed from this version for time.

The beginning of the challenge tower taught introductory mechanics, which I liked a lot.

Plans Right Now

So again, my plan right now is to just take a break.  I'm participating in the Global Game Jam in January and have some other games I'd like to start working and prototype including a 3D fighter.  I do like the idea that any console game I plan on working on will use the OUYA as a minimum spec machine.  It's pretty easy to develop once you get the hang of it.
Now I know this current version of Battle High isn't perfect; it needs a lot of love in certain areas, and if there is enough desire from others and myself, I'll give it that love.  I could have continued to work and delay, but I was at a point where delaying it just felt unnecessary, especially since is had taken so long.  The hardest part is that I'm essentially a one-person team, at least when it comes to direct development and programming.  I really try my best but between my full-time job and other projects, it's not easy.
The hardest question for me to answer is when people say "Well, why should I play this over Street Fighter?" and I can't really honestly answer that -- did I ever mention I suck at writing press releases?  True, there are some differences in gameplay Battle High and other fighting games, but the team size difference and development budgets definitely allow for much more polished products.  Not a great excuse, I know, some indies do amazing work, but even a lot of them have teams greater than one.  Anyway, if you play the game, I appreciate it and hope you enjoy any future iterations that may come out.

Thursday, December 4, 2014

Battle High 2 A+ on OUYA


So I'd like to announce with the video above that I am working on and have a working version of Battle High 2 on OUYA!  (It is, of course, without some problems, such as challenge commands showing up in arcade mode.)

Wait, what's an OUYA?


OUYA is an Android console that was released a little over a year ago.  It's most appealing aspect to me was that is was advertised as a console with a low barrier of entry.  The entire reason I started porting Battle High to Unity was so I could get the game on OUYA, and now I finally have the game working n the console.  Of course, this wasn't the easiest in tasks.

Connecting to OUYA 


So when I first started messing with my OUYA, I remember that exporting a build from Unity to OUYA was a bit of a pain, but fortunately, they've simplified this by allowing you to upload an apk over your local network directly to your OUYA.  This process isn't the fastest; it has to upload then install and this is after you make a build from Unity; so even more fortunately, I already had taken the steps to establish a proper connection between my OUYA console and my PC.

I NEED MORE POWER!


Being an Android console, the OUYA is essentially a slightly above average (or average now) phone with an HDMI port.  Now Battle High, at least I don't think so, isn't the most technically advanced game, it's just a 2D fighter, but even so, the game's large spritesheets and particle effects cause rendering issues in the game, or at least, the OUYA cannot run the game at 60 FPS like it can on PC.  Now there could be some major optimization I have to do on my part that will fix that, but for now, the OUYA version of Battle High 2 runs at 30 fps.
Another issue was the size of spritehseets.  OUYA -- or at least for Unity games -- can't handle textures larger than 2048.  I was able to optimize and get all character sprites onto 2048 square textures except one character -- Principle.  So last night, I had to devise a way to split his sprites so half were on a 2048 x 2048 and the rest on a 1024 x 2048 texture.  Fortunately, it works.  I should probably have put his use in the video.

Silver Lining?


I think the silver lining to the power problems with OUYA is it makes a great min spec machine.  I think my next game, if it is not a pure mobile game, will probably be tested on OUYA first and if I can get it running smoothly on that platform, then I will build it up for PC and any other platform it may be released on.  It's also nice because I can see how it'll look on a TV very early on and the OUYA is easy to transport to show other people if I so desire.

Network Play?


I know online play is very important for fighting games, but the initial release of Battle High 2 A+ (or whatever I decide to call it) will not have network play -- just like Dead or Alive 5:  Last Round.  I will say though that I do plan to at least attempt to have online multiplayer sometime in 2015.  Will it be great?  Probably not, but I'm at least going to try!

Release Plans


So it may be ambitious, but I'm still shooting to finish and release this game before 2015 on the OUYA marketplace.  The biggest feature I have to implement is the AI for arcade mode and after that I'm essentially "done".  There are various bugs and other elements of polish that will need to be taken care of as well, but the most important features and aspects are primarily done.  Anyway, I'll update here (or elsewhere) when I get have more information and as release approaches.