Thursday, January 23, 2014

Just a Gorilla ...

As I searched for motivation to keep coding, I decide to do a sketch in zBrush.

Friday, January 17, 2014

Alex attempts to make a game - Part 4: Keep on keepin' on ...

Game: http://www.ootr.com/Alex/NoNameFlyingGame/

Not a whole lot of updates this time.  I think I fixed the sound issue.  Or at least I got it to work Chrome, Firefox, and Internet Explorer.  I still don't know why Firefox runs so slow.  I reduced all the PNGs to 64 colors and 1 alpha if they required it.  That change didn't seem to do anything on my machine.  I also thought maybe it was because I had several canvas elements that were drawing all the time.  So I put everything on one canvas and that made things WAY worse.  So that was reverted.  One of the things I've read online was that Firefox handles arrays a bit differently than other browsers.  I could convert all my arrays to some sort of hashtable, which I believe is just like creating an generic object.  So I may give that a shot.

I added a screen that says "Loading.." so that the page isn't blank while the assets load and there is a "Start" page.  I also added some initial HUD elements.  The player can't be hit yet, so the elements don't do anything.  Except for the score.  That works.

Other than that, not much else has changed. 

Tuesday, January 14, 2014

Alex attempts to make a game - Part 3: What's that noise!?


Game: http://www.ootr.com/Alex/NoNameFlyingGame/

So I went ahead and started playing around with how I was going to introduce sound into the game. It worked out pretty well. Actually, there is a sound test for the enemy planes but I had to remove it. 1. Because I had an issue with it playing over and over again. 2. Because Firefox couldn't decode it even though the gun shot is also a WAV file.  O_o  So I just took the code out and I'm going to revisit it soon. However, before that, I need to make a loading screen. The sky got bigger and with the sound added it takes a bit to load all the assets. So while the wait isn't HORRIBLE, it would be nice if visitors had a pretty loading screen to look at while things were going on in the background. But that means I need to design one. So I'm probably going to have to do some art for a bit. At least until I can figure out what it supposed to look like. I've already got everything on hold until the assets load so it shouldn't be too hard to play a little animation during that time. Right now the bullets do nothing. Collision detection is probably the next update.


Sunday, January 12, 2014

Alex attempts to make a game - Part 2: Beware the Prototype!!

Game: http://www.ootr.com/Alex/NoNameFlyingGame/

So apparently "new" doesn't mean "new" in Javascript. Or at least it's not my understanding of what "new" is supposed to mean. Turns out if you have objects inheriting from other objects and so on, they share their prototype properties. So initially when I created the Enemy class ALL the enemies behaved the same. Or roughly the same. Took me a while to figure out I had the use the Super Constructor call in the base Enemy Class in order to make each enemy unique. That took me a lot longer to figure out than it should have. Mostly, because I got hung up on how I was instantiating the objects, so I kept chasing a wild goose. Anyways, lesson learned. :D

Also, I'm doing something really hacking so that enemy objects don't clear each other off the screen. I may need to try and generalize the rendering of all the elements, I'm not sure. But in either case, NOW the enemies all clear together, they all move together, and they all draw together. Like one big happy family.

There also seems to be a bit of a bug that when some of the enemies go off screen they pop in right in the center of the screen for a split second. That I'm going to need to fix because eventually the player will die if he/she runs into an enemy ship. 

Lastly, I started on but did not finish my sprite packer program. I need to figure out what the best way for me to actually compile the images together after they are cropped. An idea I had was to use Photoshop automation but I'm going to research and see if there is a pretty decent way to do it in just C# first. If not, or it's too difficult for my brain, I may just look into using PS automation since I've already been researching it.

Monday, January 6, 2014

Alex attempts to make a game - Part 1

Full Game Here:
http://www.ootr.com/Alex/NoNameFlyingGame/


So I started this shortly before Thanksgiving.  The idea is to make an AfterBurner Parity with stuff I know how to do.  The next phase of this would be to add some enemies to it, which shouldn't be too difficult.  The collision detection is still a mystery to me but I'm sure I'll figure it out.  After most, if not all, the elements are coded I'm going to make a beauty pass.  Right now the art is simple so that I can just get the point across.  In fact, for a long time it was just black and white squares, but I felt that wasn't the best thing to throw up on the internet and show people.  I also have to do an optimization pass to see if I can get things to run faster and just be better overall.  That sorta worries me because I've already re-written things like 3 times because I found a better way to do stuff.  However, since this is just for my own learning purposes and not for some client, I'm going to allow myself the freedom to make mistakes and some dumb choices.  Assuming I learn something in the end of course. :D  Also, this project has given me the idea to write some sort of Sprite packer.  It is tedious and time consuming to arrange the plane sprite the way it needs to be.  And since I'll be adding a couple different types of enemies and re-doing the plane art, it occured to me that it would be nice to create something that'll pack all those lovely frames together for me.  Plus I can save space by compressing the size of the plane's bounding box on the sheet.  Right now it sits smack dab in the middle of a 256x256 box on the PNG which is about 2048x1536 total. O_o  I can definitely get that down though and get the file size smaller.  I've been reading and doing stuff in C# and I'm pretty confident that I can make it happen.  The only question is 'what to do first'?  Enemies or the Sprite packer ...