I moved to a new URL! Check it out!

Flippy Flop Source

Flippy Flop Source
Yesterday I made a quick game called Flippy Flop using Otter. The whole thing only took me two hours or so, and the end result ended up being a relatively clean coded game.

I decided to add the Flippy Flop source code to the Otter source repository on BitBucket in the Examples folder. So now when you grab Otter you'll also get the source for the Otter Pong Game, and the amazing Flippy Flop.

Flippy Flop makes use of the EventRouter included in Otter. The EventRouter was originally authored by some smart Phoenix locals, and is used a lot in their Unity projects. Since it was just a C# implementation I grabbed and it stuck it in Otter. The EventRouter is all about following the Observer pattern. It can be a little weird to use at first, but I'm beginning to see the appeal of it.

(Disclaimer: There may be some bugs in the source for FlippyFlop. I didn't really check it over for memory leaks, which can easily pop up when using an Event system. If you don't make sure you're unsubscribing from events when objects are removed, or clearing the event router, you might find yourself in memory leak city.)

If you have any questions about Otter, or the source code of the game, check out the Otter forums or leave a comment below.

Comments

Alex
Alex
Awesome! I'll give it a shot tonight -- I've been meaning to check out Otter for some time now; it really seems to be coming along.

I think there's a minor typo above? "If you don't make sure you're subscribing from events when objects are removed..." Should be "unsubscribing?"
Posted February 10th 2014 6:15 PM
Kyle
Kyle
Yep! Fixed ;D
Posted February 11th 2014 1:47 AM
new comment!

Post your comment!

Name
Email
Comment