Tuesday, April 7, 2009

Motion Captured: Or, setting up tracing sucks.

I spent way, way too many hours today on getting some very simple things done. I had set myself a milestone, though, and by gum I would achieve it!

First, a shout out to my girl Aubrey who gave me a rundown on some fundamentals of Object-Oriented Programming that I had not quite picked up on. She also acted as a sounding board that really helped me pull through with a victory tonight.

Secondly, thanks to OfficiallyHaphazard for directing me on some simple vector things that I could have probably figured out myself if I hadn't had several beers. Also thanks to him for setting me up with Trace(). Good god programming with traces is so much nicer.

Speaking of Trace, I have a big beef. Actually, a list of them..
  • For trace() to do anything in your flash application you must first compile the application with debug mode turned on, which is off by default.
  • Finding out how to turn on debug mode is tremendously hard when you are using the Flex 3 SDK command-line jobby (and tremendously easy in retrospect).
  • You must also define two environment variables that aren't set by default in Windows Vista. Boy I love adding useless environment vars for a single application.
  • You must create, from scratch, your own configuration file. This file must be stored in your user directory. Wow, so convenient!
  • If you use Flash 8 or earlier, you can tell the config file where you'd like your tracelog to go. Flash 9 or later, it defaults to the oh-so-convenient c:\documents and settings\username\program data\roaming\macromedia\flash\logs\ . Woe betide the person who renames their documents-and-settings directory!
  • Googling how to do anything in Flash 3 SDK is impossible since "sdk" is such a generic term, and vastly more popular products "Flash 3 Builder" and "Flash 3 Framework" both experience all the same issues, but have different solutions.
  • Flash 2 SDK documentation is all on page 1 of the google results and Flash 3 SDK documentation is on page 4.
OK I think I'm done ranting now.

So today, I present you with a single build. Build #12. I was able to wrangle the code so that anywhere you draw on the screen, it will remember the force vector and apply it only to the squid. Hooray! This is going to be the basic gameplay element. Things will become more clear in the coming days as I solidify the complementing assets.

Build 12 is important to me though, because this is essentially it: This is the gameplay. I could call this the tech demo right now and call it quits... But I gave myself until the end of the month, which means I can turn it into a proper "game" with levels and a bit of an interface.

PS: Props x3 to OfficiallyHaphazard for finding the first ever bug. The unmapped key "d" will remove the squid's head (and therefore disable the mouse) for some reason. No idea why this is yet.

1 comment:

  1. Woo! Commenting now so when this game becomes a smash hit I can say "I was here"
    :)

    ReplyDelete