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.