Sunday, September 28, 2008

Another day, another feature

Ok! Now you can pick where you want to add a new bubble and if you hold down *shift* you can join bubbles as well. Also, I added a stylish background.

There are some bugs. If a bubble gets too big it starts acting all crazy and there are some artifacts after joining bubbles.

Also, I'm displaying the framerate in the corner. Leave a comment telling me what frame rate you get after adding 20 bubbles (without popping any).

--- applet removed ---

Update: After telling my mom about my bubble program she directs me to this Italian song from her youth: Le mille bolle blu.

Tuesday, September 23, 2008

Progress!

It seems that developing the bubble game is a lot easier the second time around. I've gotten to the point where you can add new bubbles and where the bubbles will actually slide past each other if necessary. Since I'm using Bezier curves from the java core I can take advantage of built in anti-aliasing so the bubbles should look smoother too.

Click to add more bubbles!

-- Taken down --

Friday, September 19, 2008

Russian River

Lisa and spent a couple days up north at Russian River earlier this week. We stayed at Guerneville which is up river a little from the coast.

We drove out to the beach one day and saw some kind of mystery animal washed up on the beach. It was a bit bigger than your hand, red, and looked kind of like a starfish except for the fact that it had bilateral symmetry. After several tries we were able to throw it back into the water but the origins of the mystery animal baffled us for days. It proved very hard to google. After a couple days of roaming around the mollusca section of wikipedia I was able to identify it as a gumboot chiton. Weird!

We also kayaked. For some reason we decided to take the longer route: 10 miles. I guess we thought it would be easier since it was downstream. We didn't realize that the see breeze would cancel out any impetus imparted by the current. By 5 miles we had experienced a full day of kayaking. By 8 we were incredibly tired and couldn't wait to be done. By the time we saw the town our arms were stumps of pain. Let this be a lesson to you.

Thursday, September 11, 2008

Sisyphus begins again

Since I have a week or so before my new job kicks in - and since my plans to go to New York have fallen through - I've decided to take another swipe at my old bubble game.

The main issue with the old bubble game was that it was too processor intensive so I couldn't get enough performance out of it for really fun game play. The reason it was so processor intensive is that I used a point-mass system for keeping track of the physics in the game. That's what happens when you approximate bubble walls with hundreds of little points, each of which has to have its position, velocity, and acceleration tracked and recomputed between each frame.

So I needed a quick way to approximate a curved line (or a straight one too) and track its motion without all the fuss and muss. Enter Bezier Curves. These little thingamaslugs allow me to represent an entire curved line with just four--count 'em--FOUR--points! Below is the result of my first experiment: Two bubbles using twelve points.

It's not perfect (a bit too fat) but I'm going to start integrating this into my other code before fine tuning that.

--taken down--