Saturday, April 11, 2009

Learning by Trial

My Flash newbishness really shined through today.

I've had this bug that's been plauging me for about a week. I drew a goal object - even cut n pasted code from several sources - but it would just never show up. Well, turns out I had to not only addChild(crap I just drew), but you also have to addChild(object that drew that crap) and addChild(object that called that object). I guess I understand the logic behind it - one big chain of display objects linked together to the first Sprite iteration - but this is the kind of thing that you can't solve by poring over the API documentation or simple tutorials. Sigh.

I was very excited to fix this bug, as it allowed me to move all my other drawing code - ie, the HUD - out from the main file. I had some hideous hacks in place to get those score counters rolling. I went through my code and started OOP-ifying everything up and moving code bits out into their own files.

Unfortunately, this broke something else that I just can't figure out.

Now the Hud is it's own proper object. It works fine and dandy, until you hit the Reset button. The reset button creates a new instance of the world - which then in turn creates a new instance of the Hud. My traces show that the Hud is still receiving input and drawing things, but the screen doesn't update anymore.

My hunch is that this glitch is being caused because my textboxes still exist in the world (they weren't destroyed with the reset button) and I've just created new ones behind them or something. If anyone has any tips, let me know.

Some good news: The code I wrote for the goal area seems to work great. I have some coordinate conversions to do, but as soon as those are squared away I'll have a brand new form of gameplay: Get your squid to an objective without dying. :)

Friday, April 10, 2009

No really, sticking to the plan.

I can't believe I didn't listen to myself!

Just two weeks ago I posted a blog entry entitled "The Art of Sticking to the Plan." And here I am veering wildly off the plan and adding bells and whistles - complicating a game that is fun because of the simplicity.

I put out a call everywhere - all the social networking sites got posted to - and all of my [important ;)] friends took a look at Build 18. Most people gave me some lightly positive encouragement, but the overwhelming majority was confused. Gameplay was frustrating, the concept was not clear,  and overall - people didn't have fun. I should have listened to myself, I should have stuck to the plan!

I'm going to go ahead and blame this on gameplay experimentation and not really worry about it too much. I only lost two days development time on all these weird gameplay ideas, and at least I have a recorded demo of what the gameplay could be like if I ever want to go back and try again.

As the biggest complaint was the control scheme - which is largely a relic of the original (archaic) design - I have switched changed in the mouse for keyboard controls. Left, right, and up arrow keys now jet your squid around on the screen. I simplified the concept - now it's just stay alive! and you get points for doing so. You get more points the longer you stay alive, and you get bonus points for touching planets with your cute little feet - juts to encourage more dangerous gameplay. :)

So here it is - the simplified Build 19.
  • Arrow keys now control the squid. Be sure to click on the flash first to give it focus.
  • Lose health by touching things (your feet are safe though)
  • Gain style points by moving or touching things with your cute feet
My only issue with the game as-is, is it's fairly easy to put yourself into a geostationary orbit and just tap the up arrow once in a while. I think if I bring back Ink Bottles as a propulsion fuel limit it would make things a bit more fun.

Thursday, April 9, 2009

Experimenting with Gameplay

SpaceSquid is completely experimental. The game I had written down in my notebook weeks ago, is not exactly what I'd call "fun." A quick physics toy maybe, but not a game.

In an effort to find what is fun and what can be extended into a game format, I've been playing around with scoring and how things work. Here's Version 18:
  • Every time you move your cute mommy squid will let go of one of her cute little eggs!
  • As everyone knows, squid eggs are not affected by gravity.
  • Your cute factor will slowly increase with time (plus a few bonuses here and there)
  • You will get style points if your cute squid eggs touch anything. Your babies want to see the universe! Help them explore!
  • You get a style point bonus every time you move - this is multiplied by your cute factor, so the biggest points come from saving your ink for later!
  • You have a limited amount of ink that's used in propelling you around. Touching objects will decrease your reserves. Squids aren't meant to breathe in the atmospheres of planets, silly!
  • If you touch anything when you are out of ink, or if you lose any limbs because of rough handling, the game will end!
Try playing it here, and let me know what you think of this playstyle!

Slight Gameplay Changes

It's funny how a tiny change can affect gameplay so much.

Changes in Build 16:
  • Gave the Squid his long-overdue mantle fins
  • Fixed the collision checker so it actually reports even light touches. This actually made the game horribly difficult so I disabled collision checking on the little club feet your squid has. Feel free to touch things with that!
  • I played around with a bunch of motors and limit settings. The squid should flow a little more naturally now instead of just tangling himself up every chance he gets (though he still will if coaxed)
My high score in this build is.. 156% Cute, 7 Friends. Try to beat my score! Click to play Space Squid!

A bit more Game-Like

I spent a big chunk of the evening trying to get a goal area built into the game, but I've failed. :( I'm having trouble wrapping my head around all the Sprite objects and exactly where I need to put things to make them work. I'll figure it out eventually.

I've hacked together a bit more of an interface and tuned the level a little bit more. Here's the lowdown:
  • Avoid touching anything. Squids are very delicate and they don't like brushing up against planets or the edges! Sometimes they will be forgiving but usually it will end your game.
  • Propel yourself around with the mouse. Draw vectors - the longer the line, the more oomf! You don't have unlimited power, though. It costs you Ink Bottles to move, so use them wisely!
  • Build up your Cuteness by surviving for a long time! The longer you last, the faster your Cuteness accumulaes. You will also get bonus cuteness for using your ink bottles - the bonus is greater the later you use them!
  • As time wears on, your squid will get more and more popular with his buddies! See how many friends you can accumulate. This accumulation is linear.
  • If you lose a limb in a crash, you might make enemies instead of friends :(
I'm sure you'll quickly realize that proper usage of your ink bottles to attain the longest standing orbit is the call of the day. Try your hand at getting a top score!

When I get the goal areas in, they will "open up" at a certain cuteness level. Surviving throughout the level then making it to the goal area will be the main challenge. Soon!

Oh, and I also added a few light-duty motors to the squid tentacles. They wave back and forth a teensy bit now, just to destabilize your orbits. :)


Special thanks to Aubrey for the scoring formulas (I learned logs today!), and thanks to OfficiallyHaphazard for helping with Cosines for the tentacle waving!

Wednesday, April 8, 2009

Space Squid: The Game

There aint no party like a cute squid party!

Objective: Don't touch anything! Make sure you get as many Squid Friends as possible (and looking maximal cuteness along the way)!

Careful though, you only have 100 InkBottles to propel yourself around the screen with!

If you touch anything you'll end the game, but if you end things catastrophically you will also lose Squid Friends!

Space Squid: RC1

I like calling things Release Candidates because, though it has applied to be a candidate, it will not be the candidate. It has pre-emptively failed.

Anyway, BUILD 13.

I am really happy about this one. I put some instructions on the screen and even built a prototype level that acts as a neat little sandbox. The instructions are fairly easy: draw a vector with your mouse. The length is the strength. Things to try:
  • Beat the game as specified (touch the right, then left, wall)
  • Try it without losing any squid bits
  • Try it going fast
  • Try it going slow
  • Try tearing your squid apart completely (his head bits do seperate but is very hard to do)
  • Try knocking all the planets out of orbit (pro tip: hump the planet with your squid legs)
  • See how long you can drift without touching anything, not even the walls
I have some significant gameplay changes coming in the pipe that makes the game... much more a "game" than a toy. Stay tuned!