Fun with physics.
One presentation at SiegeCon was "How to build a flash game in 45 minutes", and the presenter built Breakout during the presentation. It was targeted mostly at the students at the con, but since it beat my own 200 hour estimate by 199.25 hours, I went.
Tonight, I tried to duplicate the feat, but failed in the 45 minute goal because I got impatient with my own off-the-cuff physics, and decided to look into APE, an open source Actionscript physics library.
I got APE, and converted the game objects to APE physics objects in an hour or two. I was stymied at first because APE's current release, v0.45, doesn't generate events on collisions. This made the actual breaking-out part of the game problematic. Luckily, I discovered after a bit of poking around that the latest version in the code repository (it uses googlecode.com), does support collision events, and it's pretty stable.
So I switched to the latest code, and here is the result. It's crude, and it took four hours -- though to be fair I was watching an incredible Monday Night Football game at the same time.
APE is pretty neat, though it still has lots of quirks. For example, collisions caused when you forcibly move an object (like dragging the paddle with the mouse) can be weirdly sticky and wrong. Try whacking the ball with the paddle to see what I mean. It also seems particularly susceptible to objects passing through each other when velocity is high.
I might spend an evening or two turning it into a real game with art and levels and stuff. Just cause.
Monday, October 8, 2007
Subscribe to:
Post Comments (Atom)
3 comments:
Okay, that was pretty fun until the ball got stuck bouncing horizontally between the two walls, and my paddle wouldn't go up high enough to whack it. Also I miss the beeps and boops of the Atari original.
I lost one ball off the side somehow. There was no ball on the screen anywhere for about 5 seconds, then it told me ball lost.
I thought it was funny that I actually lost a ball as opossed not bouncing it back which is usually the case.
I lost one ball off the side somehow. There was no ball on the screen anywhere for about 5 seconds, then it told me ball lost.
I thought it was funny that I actually lost a ball as opossed not bouncing it back which is usually the case.
Post a Comment