Thursday, April 30, 2009

SPACE SQUID GOES GOLD!

aaaaaaand FINISHED!

What a ride this has been! I'm sure I'll post a retrospective or two as things progress with game distribution, but for now... It's time to take a break!

The last and final build of Space Squid will clock in as Build 48. Considering I only had 30 days to complete this project (starting from complete scratch! Never written a game before!) I'm pretty gosh-darned proud of that.

I put up a special credits page so those who deserve them get immortal props :) Check it out, there's some good links in there to some excellent people and some other great games.

Thanks to everyone who congratulated me via IM, eMail, and Twitter during the last few hours! It made the evening that much more stressful. ;)

I'll be contacting a few media places for reviews, interviews, and submitting my game to a bunch of websites tomorrow. We'll see where that takes us!

Here are the laetst, last-minute changes:
  • Removed the level-20 victory message
  • Changed the ink bar from red to black, and moved the bar up paralell to the word
  • Updated the scoring text to indicate the +5000 point bonus for beating a level without restarting
  • Made the level number reset to Level 1 any time you exit to the menu
  • Added a credits page (that looks like ass. Sorry Aubrey :( )
  • Made the game ping Google Analytics every time a level is started - will help differentiate generic or passing-through site traffic with legitimate game players.
Play the game on the official Space Squid Website!

Down to the Buzzer, Space Squid!

Wew! 4 hours to go!

A very special thanks goes out to Ryan Madsen in this update. I've always wanted to have ink in the game, but could never find a decent mechanic for it to work out. Ryan thought one up on a whim and by golly it works.

Since I already had some art assets for ink in the game, it was fairly quick to prototype and test, and it's been uploaded in the new, shiny, Build 47. I really shouldn't be making sweeping changes like this so close to the deadline, but I really really really wanted ink in the game.

There will likely be just one more update to the game before release at midnight tonight with some quick bugfixes (if I find any). Here's what I've got so far in Build 47:
  • Ink now jets out of you when you hit the boost button... In fact, I renamed all references from "Boost" to "Ink."
  • The ink can capture stars. This adds a whole new layer of strategy to the game. Capturing stars this way will net you +500 points.
  • You still get +500 points for capturing stars with a full ink meter, so whether you use it or not shouldn't affect your score too much (directly). However, if used wisely, it can really decrease your time!
  • The ink persists in the game world for 5 seconds only - if it's underwater. If above water it doesn't start decaying yet.
  • You gain a 5000 point bonus for beating the levels in sequence without having to restart. Those who received this bonus are shown in Bold on the high score table.
  • The high score table was manually updated so those who didn't receive this bonus earlier now have it (and I lost my #1 ranking on several levels :( )
So now you can launch ink (use boost) in the air... Pros and cons there that add strategy to the game: You can use boost underwater, and get ink PLUS speed boost... Or you can use your boost in the air, and you only get ink... but the ink flies further and stays alive longer. A nice tradeoff!

Anyway... Almost there! Midnight, here I come!

12 Hours To Go - Score Revisions?

I've got 12 hours left in my development cycle and I'm seriously considering switching one of the score mechanics. I need some input on this one! Hopefully I'll get a few responses from people in the time I have left.

When a score is submitted to my HighScore Database, it sends along with it a "legit" flag (also known as "Champ"). This flag is set "true" if you have not died/restarted/skipped levels since beating level 1, "false" if otherwise.

I put in this distinction as I wanted people to know if someone hammered away on a level, twenty times in a row, just getting lucky and nabbing the high score -- or if they "legitimately" played through the game and got those high scores due to skill.

This distinction is currently marked by the bolding of someone's name on the high score table. Here is an example of what I mean:

This high score table indicates that not only am I, weasel, in first place - but I attained first place on a single attempt through, utilizing my great skill and nothing more. You can further infer that both Pacifist (#2) and Hap! (#4) skipped directly to this level and attempted to beat my score that way, and failed (though it could also possibly mean they just died once somewhere along the way). Either way, this shows that my skill is to be celebrated even more!

With some discussion and thought it has occured to me that, eventually, the #1 spot on all high scores will no longer be bolded. The awe and aura of having a bolded name is good in and of itself, but it will not prevent human nature from just pummeling the digits column and attempting to elevate their score, regardless.

It is therefore my prediction that with this current layout, all worlds will end up having their high score tables dominated by scores flagged as 'non-legit'.

Here is my proposed solution: Give each user +5000 points for completing a level in a 'legit' fashion. This works out to be somewhere around a 25% boost to the average score, and less than a 10% boost for those pro-players in my current high score tables. It is still conceivable that the high score can be held by a non-legit holder, but doing things 'the right way' will give you a significant leg-up.

Thoughts?

Wednesday, April 29, 2009

What to do, Space Squid boo?

As of this post..

T MINUS 33 HOURS!

As of midnight tomorrow I'll be done, so that I can get a good night's sleep and enjoy my Friday. If you have any gripes or suggestions, this is the time to submit them!

I'm finding it increasingly hard to work on the game because there simply isn't much more I can do with it. It's really come together nicely. Check out Build 46 for example - almost nothing much changed!
  • There's now a mute button on the Main Menu (that remembers your preference in a cookie)
  • Added an obscure, tiny donate button on the bottom left of the Official Space Squid Webpage. I might have to make this link more prominent.
  • One person reported an odd gamestopper bug - seemingly occurs at random, but the squid freezes in midair. I've not been able to reproduce on this end but I made some code changes as a precaution (I think it might have to do with an unhandled IOError event when streaming music).
  • Fixed a crash bug: If the ping to the high score server went slower than you restarting the level, the game would hang
  • Fixed a crash bug: If the ping to the high score server went faster than a single game tick the game would hang.
  • Made the date on the high score table actually based on Pacific time instead of Eastern time (why isn't it called Atlantic time?)
I'm also proud to say that all my webpages are STRICT-validated thanks to Aubreys hard work on my webpage. Hooray for conforming to web standards!

And yes, by saying the page conforms with web standards, I'm raising my middle finger to IE 6. Want to make something of it?

MXMLC Ruins FileSizes

While working on Build 45 today I noticed something - that my file size for the project had almost hit 200KB.

That's a lot of KB. And considering a pretty big chunk of the population in the US is still on Dialup, it's an unacceptably large number of KBs. It was taking 2-5 seconds to load on my broadband connection; I shudder to think how many people would scare away from a slower network!

I took a look back through the history of the game, and took a look at how the filesize grew with time.
  • Build 1 was 2KB. This was built in Flash directly, not in the current framework I am using now.
  • Build 2 was 54KB. This was my first setup in my actual dev environment, with all the physics libraries and various plugins I needed. I call this my baseline - this is as small as my code will get. A lot of this - probably 45KB of it - is the Flex Framework.
  • Build 11 was still 54KB.
  • Build 12 was 90KB. You may notice very little difference between build 11 and 12; indeed, the difference is absolutely miniscule in terms of code or assets. The extra 40KB in weight is entirely from debugging statements.
  • Build 26 broke 100KB for the first time (109KB to be precise). It's not surprising either - it's the first build that includes graphics (albeit basic graphics).
  • As I added more and more art assets, the game ballooned to 158KB by Build 38. By this time the game is really starting to look like the final product, and some of the art assets are still in place in the game today.
  • Build 39 took the cake for the largest single asset size jump - hopping from 158KB to 176KB just for the new menu components.
  • Finally, build 44 weighed in at 182KB.
Build 45 was nearing 190KB when I first compiled it early this morning. That's when I noticed it, and started trying to slim it down:
  • I had been lazy and was importing files I didn't need in my source code. By removing these, I slimmed my code down to 169KB - that's 21KB saved just by commenting out a few lines!
  • I turned off debugging - Which got me 30KB back. 139KB!
  • Finally, I turned on compiler optimization, which apparantly swung me right down to 129KB - which is my latest upload to the server, and the version you are playing right now.
I'm OK with having 70KB worth of art. Mentally subtracting that from my total I'm left with that oh-so-familiar 59Kb - right where I started.

After much Googling this evening it turns out that this is the price I pay for using the Flex SDK instead of the proper Flash IDE. The Flex development framework has a bunch of "features" it includes to help develop things in this pure-code environment wheras the proper, paid-version IDE is a bit more on-the-ball with what you actually need. Up until this point I had not seen any good reason for using the Flash IDE - but now I'm wondering if it's worth the 50KB penalty to stick with the Flex SDK and MXMLC. 

I didn't wonder too long, though. The answer is Yes. :) Big bloatware notepads-on-steroids is not what this industry needs! rawr!

There are a few other ways I can reduce filesizes - but to be honest, it's beyond me. I'm not even sure if I can make the suggested changes to this particular project. But let it be known, that there are mythic stories floating about the ether; proclaiming in a dream-like voice that a programmer somewhere... Somewhere far, far away... Has compiled a Flex SDK application in under 10KB.

I guess I have something to dream about at night while comfortably nuzzling my pillow with a smile on my face.

(For comparison; Colin Northway used the Flex SDK to build Fantastic Contraption, and it is 274KB - so I guess I should stop bitching. :) )

Edit: None of the sizes quoted above include audio assets, which are dynamically streamed from the server. For the curious, I have 63KB in sound effects and 2.25MB in music.

Tuesday, April 28, 2009

Minor Update: Security and High Scores

I did a real quick update this evening - it's all backend stuff so I didn't increment the build number, it's still v45.

Thanks to Ben Fox for spotting HTML exploits in the PlayerName/WorldName fields. I had been focusing so hard on SQL exploit prevention I completely forgot. :)

There might be a hole in a place or two still on the site itself, but I'm fairly certain there's no more security holes in the application.

I finalized High Score display elements early this afternoon and as I write this Aubrey is doing me up some CSS to make it look pretty (should be uploaded shortly). One of the biggest features I added was Player Specific Stats. It's like a hockey card, except for a squid. :)

Polish Festival

Mmm, Polish Sausages.

To avoid future ambiguities, Poland should start spelling with two Ls. "Pollish People Use Polish." Makes sense.. Poll -> Pollish...

I've been working on the big to-do list from my last post and I've gotten quite a bit done so far.

One of the things on the list was to make some new screenshots. That was a bit misleading; I actually need a 100x100 pixel "thumbnail" that encapsulates what the game is for easy browsing. Most flash games have this - an icon or a logo of some sort.

I really hate making these kinds of things - I'd rather people just play! But visual guides are handy and they sell well. Here's what I came up with:

Nice, simple, and to the point. Incorporates the Space Squid textual logo as well as the squid and the star, the two primary elements of the game. PLUS IT LOOKS OH SO CUTE,  AWWWWWWW

Some other things I cleaned up in this latest update, build number 45:
  • Returned the main menu destruction and properly focused the game upon instanciation. I was even able to answer my own Stack Overflow question for this one.
  • Rewrote the main menu and all the instruction slides. Now it's more uniform and coherent.
  • Reworked the "Click for More" icon.
  • Fiddled with the colors of the fishtank - I'm not sure if I like this and might change it again.
  • I played with the yellow of the boost bar for around 20 minutes but I kept settling on the yellow again. I made the yellow bit slightly thinner just to say I made progress and left it at that.
  • Made sure the squid's cute little face is always the topmost component - no more obscuring his face with his arms. We wanna see that smile!
  • Made the first segment of his short arms a little thicker - they were narrower than the tips which made them look a little goofy.
  • Looked into the short arms "Drooping" - unfortunately I'm not going to be able to fix this by release date. I currently have buoyancy turned off for the arms - which means they just sag with gravity - but if I turn on buoyancy the swimming dynamic is completely thrown off for the rest of the squid. I'd have to rework all the weight and thrust values which will take me a long time. I figure it's a tiny detail - might as well let this one slide.
  • Changed the hud score display colors to a base blue. I really like how it looks this way! I don't know why I picked purple to start with...
  • Removed the border around the high score name input boxes and made them wider, and left-justified them so they don't act silly when you're typing away.
  • Turned off stats and rankings for "Anonymous," and replaced them with a sign urging people to sign in. It still records Anonymous scores and ranks them on the website though.
  • Replaced the story text with game mode description text. This will be more handy, and noone will read the story anyway.
  • It came to my attention that on any computer without the "Elements" font installed, the countdown timer and score displays were using Times New Roman. That's lame. I think I fixed that now though.
  • Made a new faded-yellow "Galactic Premonition" (preview star).
  • Made sure the EndGame boxes show up over top of everything else.
I'm going to spend a chunk of the rest of the day today working on the HighScore displays on the website, so those should be looking nicer and nicer as time goes on.


I also realized that there is no real "industry" in Victoria and I don't know enough people to throw a launch party. So here's what it is: I'm going to the nearest pub, I'm going to eat calamari and get drunk. If anyone reading this wants to join me, drop me a line.