Pretty banner! :)

4k Flash: Falling With Style

Vote for this entry at the 4k Flash Game Competition polling station

Download the source for this entry

Author’s Readme

Clint Herron hanclinto@gmail.com

Title: Falling With Style

______    _ _ _               
|  ___|  | | (_)              
| |_ __ _| | |_ _ __   __ _   
|  _/ _` | | | | '_ \ / _` |  
| || (_| | | | | | | | (_| |  
\_| \__,_|_|_|_|_| |_|\__, |  
                       __/ |  
         |  |.|_|_    |___/   
         |/\|||_| )           
          .-.  .      .       
         (   )_|_     |       
          `-.  |  .  .| .-.   
         (   ) |  |  ||(.-'   
          `-'  `-'`--|`-`--'  
                     ;        
                  `-'         

     A game by HanClinto      
( hanclinto at gmail dot com )

Controls

The game is controlled through the keyboard

  • Arrow Keys – Tilt / move your skydiver. Your avatar moves based on his angle to the ground.
  • Space – Opens your parachute (when you are close to the ground). Also starts the next level.
  • Shift – Holding this button enables “acrobatic” mode, which allows you to do flips (for bonus points), as well as to orient your skydiver to be head down (to fly faster, for a better time bonus).
  • Escape – Cancels your entire run, taking you back to the opening screen. WARNING: Your progress up until that point will be lost (though your last cumulative run high score will still be saved).

Game Description

“Falling With Style” is a game about skydiving. Your skydiver’s angle to the ground determines where the wind pushes him. Using the arrow keys, you can tilt your skydiver and cause him to fly in different directions, to speed up or slow down, and even to do flips and rolls.

There are 10 levels in the game, and to pass each level, you must get at least the minimum number of required points.

Three things will give you points in the game:

  • Accuracy of targets (500 for an exact Bullseye)
  • Acrobatic stunts (200 points for a flip or a roll, with diminishing returns)
  • Time bonus (use “shift” to fly with your head downwards for speed, and open your chute as late as possible to maximize your time bonus)

You can pass the early levels in the game with using only 1 or 2 of the score-gathering techniques, but to pass the later levels, you will eventually need to master (and sometimes mix) all three.

If you fail to achieve the required number of points on a level, you will be able to retry the level, but the cumulative score for your run will be reset.

The game tracks (and saves) the highest cumulative run score.

Tips

  • The way to get the highest run score is to beat the game, starting from the beginning of the game, and not having to retry any levels through the end.
  • Remember that the arrow keys don’t exactly move your character — they merely rotate him. This is a subtly different thing.
  • Left/right rotation is relative to your character, not the camera. This means that when you’re flipped on your back (head towards the bottom of the screen), left/right is reversed.
  • If you’re flying with your head down, and you’re on target, you can do barrel rolls to rack up extra points without significantly affecting your trajectory.
  • Opening your chute late is a great way to score more for your time bonus, but be careful — crashing will make you lose your progress!
  • Remember, you’re not flying, so much as just falling — with style. :)

4k Techniques / Postmortem

Wow. 4k. As every entrant can attest, this was perhaps one of the most technically challenging coding contests I’ve ever entered (and also one of the most fun).

I’ve only done a couple games in Flash before, so I started out the competition by just learning how to use more of the Flash SDK. I first started out trying to learn how to use some of the procedural content generators. Once I found the Perlin noise generator, I was hooked, and I knew I wanted to do a game based on it.

Chatting with my friend Steven, he suggested a skydiving game. I immediately remembered an old cell phone game I used to have years ago, and knew that the Perlin noise generator would work perfectly for clouds. I spent a fair bit of time experimenting with the function, and learned how to do pseudo-3d movement. As far as the 3d math equations, I was really blessed to usually guess and get them right on the first or second try — it was almost scary how quickly things started working. After the base was made, it was just iteratively developing the game, slowly adding functionality and features.

Towards the end of the contest period, my friend Charlie came along and told me the honest thing that friends do best — tell you that your game that you’ve worked so hard on, really isn’t very much fun. He gave me a lot of good constructive criticism, and really helped me a lot with putting levels into the game — with encouragement, code snippets, and friendly nagging. :) All in all, the last push of the game was really helped by him, and I’m confident the game wouldn’t be half as much fun as it is if he hadn’t really stepped up here.

One nice thing about a 4k limit is that it really constrains the scope of your game. That didn’t stop us from trying to think a little big, though. At its largest, the game was about 4800 bytes, before finally being beaten back down into submission. One of the hardest things about being a relatively new Flash developer who isn’t very much into the community is that I had no idea what kind of competition to expect. Using Flex Builder (and not CS3), the cost to embed resources (such as sound) is pretty restricting, and so I often pushed myself just from the fear of the unknown. Having professional game developers like Squize entering the fray was really intimidating (and motivating!) — I suppose the judging will see where I place. I’m reasonably confident that I did my best, and have no regrets about decisions I made.

The code is pretty gross — I thought about obfuscating it before submission (just for kicks), but I figured it was cryptic enough as it is, so I left the comments intact in case anyone would like to try to learn from it. If so, good luck. :)

Compiling Notes

Expected build size: 4043 – 4090 bytes (depending on your compiling platform, lunar cycle, and the flapping of Brazilian butterflies)

This game REQUIRES that you compile with the -raw-metadata ” command line switch to build under 4096 bytes.

Included is a Flex Builder .actionScriptPropteries project file. I am on a Mac, so I have only tested this with Flex Builder and the command line compiler — I sincerely hope it successfully imports into FlashDevelop. If not — well, it’s only one file, so hopefully it’s easy enough to compile.

Note: I had to include in-game instructions at the last minute, and so commented out some try/catch safety nets around my persistent high-score SharedObject. You have been warned.

Special Thanks

  • My family, for putting up with me coding long into the night…
  • GamePoetry for hosting such a fantastic contest
  • Steven P. for the base of the game idea
  • Charlie M. and Ben Garney for their outstanding help with coding and design.
  • Everyone who helped me test — Robin, Sam, Ben F., SSquared, JeT, Joe, Mene, Saluk, Christo, Sorear, and many others
  • Matt
  • The fantastic people at ChristianDevs.com
  • Everyone in the competition community who posted suggestions on how to shrink file sizes.
  • Adobe for making such an excellent product.
  • PilotWings for some inspiration, and while I never played it, I watched some YouTube videos of it, and had a cheap clone of it on my old cell phone.
  • FIGlet and ASCII Generator
  • Babelmark
  • And most importantly, my Lord, Savior and Friend, without whom I am nothing (and my coding stinks).

Judge’s Comments

Michael: This brought me back to the heady days of Pilotwings on the N64. The graphics are fun and trying to freefall and flip and manage the relative movement of the controls is a lot of fun… but only for about 29 seconds. It really needed to be longer for me to feel like I could experiment with the controls and play with tricks and scoring.

Chris: Haven’t seen this game style in a while, very well executed. I enjoy the subtle 3d effects when rotating your man. Level progression is great too, quite fun on the later levels.

Panayoti: Impressive range of options, with points for tricks, accuracy and an appropriate landing. I wish I could use the mouse and that rolling wasn’t based on the player’s rotation. Great effort, with a high level of polish and definitely a game I’ll remember from this competition.

Vote

Vote for this entry at the 4k Flash Game Competition polling station


1 Trackbacks & Pingbacks

  1. March 13, 2009 2:52 pm

    Photon Storm » Blog Archive » 4k Winners Announced - Audience voting open :

7 Comments


  1. ccmauck

    Oops! The first judge says it needs levels, while the second complements the level progression. (It actually has around 10 levels.)



  2. HanClinto

    @ccmauck: I think the first judge might have been saying that he wished the individual levels were longer, and that he would have enjoyed the flexibility to player around with more than 30 continuous seconds in freefall. During testing, I remember one playtester making the same comment, but to have increased the freefall time that late in development would have required a rebalancing of the time bonus multiplier, and I felt it was working too well as it was. Plus, I wanted to keep the gameplay short (less than 1 minute per play) to keep it casual, and yet inviting to continue progressing in the levels.

    It’s one of those gray areas that’s so tough to balance — the unbroken immersion for the long-run player vs. the punctuated stopping points for the casual player. Lots of lessons for me to learn. :)

    Thanks!

    –clint


  3. I thought the levels were good. The first level was enough to learn how to play.

    Nice job!


  4. This was the coolest game I have ever played.


  5. This was easily my favourite 4k entry of the whole competition – excellent work, and worthy of a far more detailed / praising write-up than it actually got.



  6. FabFreddy

    This should have got a much better judge review. I thought this one was very original. I’ve been having a blast with it! Dis one es da bes one, I luv et!



  7. MollyMoon

    OMG!!!! This game pwns!!!


Leave a Reply