The Animal Farm

September 17th, 2010

Back to Basics

I just bought a Mac to do iPhone dev, but that doesn’t mean I’m abandoning Android as a platform. It just means I’m going to have a go at cross platform. Whether this is a good decision or a monumental waste of time has yet to be established, but it’s the path I’m taking for now.

This means that I’m coding in primarily C++. There are a few points where I’ll have to go to the platform’s first class language (Objective-C for iPhone and Java for Android), but I hope to make the lion’s share of my code trivially portable.

Hurdle #1: The Android NDK doesn’t support STL. There have been successful ports, but they look fairly brittle, and I want to avoid tying myself to something that might break on the next NDK update. Which means rolling my own.

Of course, I don’t plan on re-implementing the entire STL. I don’t even plan on re-implementing any of it. I’m writing my own classes designed to suit my needs on an as-needed basis.

Here are some things which I immediately recognize as essential and which have already been implemented:
LinkedList - The classic.

HashMap - A decent dictionary structure. A standard ‘map’ might be useful, but I didn’t care to implement a red black tree.

StringBuilder - My equivalent to std::string, but with some operators purposefully left out to avoid accidentally creating a lot of temporary strings. We’re working with portable devices after all.

UnorderedPool - No STL equivalent, it’s a fixed-size structure of my own devising that supports O(1) insertion and removal from any point but doesn’t provide guaranteed item order. Useful for, as an example, particle systems where you throw around a lot of light-weight objects.

That’s about it. I’ll probably need a Vector implementation at some point, but those aren’t especially hard to create.

It’s been a while since I coded these kinds of things in C++. Nothing particularly hard here, but still a time sink that kept me away from working on an actual game. I’m pretty much past that now, though, and I’m juggling around ideas.

The best way to hide a body is by sending it into geosynchronous orbit.

September 13th, 2010

Updating from a MacBook

There’s nothing shadier than carrying a wad of dollar bills into a Starbucks to buy a used MacBook from a guy off CL, but that’s how we do here at the Animal Farm.

It was cheap. Dirt cheap for a computer of its quality, which was the primary appeal. I tested it before purchase to make sure nothing shifty was happening, and everything seems good. If it explodes in the next week, well, I learned my lesson.

So I got a computer to do iPhone development on and didn’t have to give Apple a dime, which was the secondary appeal. Well, except for the developer license I’ll have to acquire (boo), but luckily I can use Laura’s iPod Touch, so that base is covered.

I feel a little dirty, no doubt, but there are markets that need exploring. Plus I can now work from home… which I guess is a bonus?

No, not really.

I do feel a little dirty, though, now that you mention it.

September 12th, 2010

A Cornucopia of Updates

Because we all like lists…

(1) See the Light Android sales update: Over 1800 trials. 31 sales. It has officially surpassed the XBLIG version in terms of trials in less than half the time, but the XBLIG version has 5x the sales.

(2) Game Ed 2.0 (which at this point is mostly Sprite Sheet Editor) makes me appreciate WPF more and more each day. Data Binding = love. It’s an area Interface Builder tries to do but doesn’t bring everything to the table.

(3) Spaced and Better off Ted! Two comedies. Spaced is easily Simon Pegg’s best work, and it’s pretty clear he took a lot of his ideas forward into his later (awesome) movies. Better off Ted is quirky and fun and entirely too underrated; it has some of Arrested Development’s charm.

(4) I never gave Plants vs. Zombies an honest shot until it came out for XBLA. Now I have. There are a lot of good ideas wrapped over a decent (though not stellar) game. I think its biggest win is the unending reward system - you get something fun after almost every level, a feature from which virtually all games can benefit.

(5) Have I mentioned League of Legends here yet? An awesome Defense of the Ancients style game. If you’ve got a PC, you should play with me… please?

(6) Fully moved into the new Cary digs. It’s a good townhouse with plenty of awesome restaurants and coffee shops within walking distance, which is its primary appeal.

(7) Got a cheap (Intel-based) Mac you want to sell? I’ll buy it. Desktop or laptop. I still hate Apple. The impetus for this is three-fold: (a) I want to take a shot at bringing one of my games (or a new game entirely) to see what the market is like. (b) I’d like to work from home every now and again, and I’ll be on Mac-based projects for the foreseeable future. (c) I don’t actually want to give Apple money, so I’m only going to buy used.

I think that’s all I have to update on for now. My next post will be prose, but I’m not entirely certain about what yet.

Rabbits rabbits rabbits rabbits.

September 6th, 2010

Indie Game Jam!

It’s been a long time since I participated in any time-constrained game development competitions, and with some free time (not really) available this weekend, I decided to attend the Triangle Indie Game Jam in Raleigh. It was a three-night event, so I’ll describe the nights in order and then post screenshots of our final product. I’m going to focus more on the process and less on the game, which I will talk about in another post.

Friday was ‘planning night.’ About 7 people showed up and pitched ideas for a game with a common theme: Placing Blocks. I pitched two ideas:
(1) A puzzle game where balls would constantly fall and you have to place blocks to get them to bounce to a goal.
(2) A tower defense/reverse Jenga style game where attackers are constantly weakening your tower, and you have to place pieces to keep it from tumbling.

Between the seven of us, about 18 ideas were pitched. I’m not going to enumerate them all, but in the end, the four that were picked are thus:
(1) A Rogue-Like where, instead of attacking creatures, you pick up blocks in the world and then place them elsewhere to try to avoid/manipulate enemies.
(2) A game where blocks of different colors constantly fall into gates, and you have to open/close gates strategically so that when the blocks pass through, they form an image.
(3) A reverse Jenga style game where you must build a structurally sound tower.
(4) A Lemmings-like where instead of assigning jobs to the Lemmings, you manipulate the environment to get them to appropriate positions.

I decided to go the Rogue-Like route, having a random dungeon generator already written and some interest in the genre. I was joined by Mike Lee and Mike Daly.

On Saturday development started in earnest and lasted from 9:30 AM until about 11 PM. We decided to break the project up into 4 distinct phases of development.

In Phase 1, we targeted standing up a lot of core code, get movement and (super basic) enemy AI in, allow creation and destruction of tiles, and put all the major state transitions (win, lose, main menu, etc) in place.

In Phase 2, we targeted picking up and dropping blocks properly, where blocks would be stored in an inventory. We wanted all the different tile types implemented. We also wanted random dungeon generation and a couple more enemy types. SFX were planned, but we cut those from the phase.

In Phase 3, we planned for race/class selection, limited vision, spells, and music.

In Phase 4, we wanted to implement all the enemy types and make things shine a little more, with multiple level themes and seamless graphics.

After planning the phases, we started some extreme programming for a couple hours, where we all huddled around Mike’s computer and outlined the core code. There wasn’t a lot - enough to get a solid Rogue-like simulation running, but it was a fair start and got us to the point where we could break up tasks.

Upon breaking up tasks, I initially spearheaded most of the rendering and level creation. As we pressed on and people finished tasks, we just started pulling things off a list that we were interested in doing. It was a fairly distributed bunch, with me on a lot of the rendering/map generation/level progression, Mike L on enemy AI/importing graphics/tile types, and Mike D on actions/menus/HUD. Which isn’t to say that anyone had clear roles, since we all regularly grabbed arbitrary items out of the task list.

We blasted through Phase 1; Phase 2 had a lot of work in it, but even it went quickly. By the day’s end, we were ramping up on Phase 3 and planning out our next (shorter) day.

Sunday development went from approximately 9:15-5:15.

Phases 3 and 4 blended into each other at this point - we compiled a list of all the things we wanted to get, a wish-list of things we knew probably wouldn’t get in, and ideas for how to improve the gameplay. There was a lot of back and forth on how to make the game fun and how to make the concept work, and by the end we had a list of about 20 tasks to knock out.

So we just got to it. Though we prioritized the items, we jumped up and down the list regularly based on what each individual thought was important or wanted to work on.

And we got nearly all the list done. We did have to cut spells, SFX, and a bit of polish, but we spent the saved time adjusting stats and gameplay parameters instead; a rewrite of the control scheme, for instance, though not strictly necessary ended up making the game much more playable.

At 5:15, development stopped and people showed off their projects.

In the end, our little 3-man team made a fully-featured, well constructed game in just under 24 hours of work. Our code base is terrifying, but that doesn’t matter.

Here are some (blurry) screenshots of our finished product!

Brixplorer Title

Brixplorer Character Select

Brixplorerer Play 1

Brixplorerer Play 2