Unity3D Pet Peeves

I’ve been using Unity3D a lot lately and naturally have developed a list of gripes. Let me clear my throat…

The GUI.

Having fluid 3D graphics in a Unity3D game isn’t a major accomplishment. It’s when a game has a great GUI that Unity developers crowd around and wonder how it was done. The fact is, Unity3D’s GUI system is absolutely atrocious. Getting anything decent out of it is worthy of a Congressional Medal of Honor. I shudder to think how much work it took to craft Battleheart’s amazing GUI in Unity3D.

Back in 2005 when Unity3D was preparing for its first release, Immediate Mode GUIs were a hot new trend. However, game interfaces can be complex beasts. Especially on iOS platforms, there’s a certain level of polish expected that Unity’s IMGUI implementation can’t come close to. Also, Unity3D’s GUI has weird performance issues on mobile devices that makes it pretty much useless on iPhone.

Unity3D 3.5 supposedly has an all-new GUI system that I’m eager to see. Unity hasn’t uttered a word about it. Instead they have been going on about AAA console game features such as light probes that are largely irrelevant to anyone doing mobile games.

AnimationEvents can only be called on the first script.

Adding and manipulating animations in Unity3D can’t be much easier. Just drag and drop animations on to a prefab. Blending between animations is just a simple API call. You can even point and click to add AnimationEvents on any animation’s timeline. These are function calls that are made on the timeline, usually to trigger sounds, particle effects, etc.

The problem is, the AnimationEvent system can only call functions on the first script component attached to the object. This wouldn’t be a big deal if you could re-order the scripts in the Inspector. Instead, the only way to change the script order is to remove all script components and re-add them with the one containing AnimationEvent code first.

Asset Server should merge binary objects.

Before Unity3D supported source control in the Pro version, your only option was the $500 a seat Asset Server. This is a no frills source control system that allows multiple users to collaborate on scenes together. Unity should be able to craft a source control system that knows its own object format. If you could merge changes of binary objects down to the component level, Asset Server would be invaluable. Otherwise, Perforce is a better alternative. Even with Perforce, scaling a Unity3D development team beyond 10 or so people can be a nightmare.

Why are you using Unity3D at all?

Here’s the thing. Why are you even using Unity3D? Is it for 3D graphics? Who cares? There might be one or two 3D games in the top 50 iPhone apps sorted by revenue. On Facebook, nobody cares about 3D either.

The fact is, Unity3D is busy trying to attack the collapsing AAA game market with high end features such as multi-core renderers and light probes while ignoring what the vast majority of their users need–mobile friendly features such as GUI and 2D support.

My interest in Unity3D stems from its multi-platform features. The ability to effortlessly spit out web, iOS and Android builds from the same code is attractive. Still, when %80 of your revenue comes from iOS, do you really think it’s worth the hassle of dealing with Unity’s shortcomings just to scrape up a few extra dollars?

The amount of time I’ve spent searching for the ultimate cross-platform solution would probably have been better spent nailing an excellent iOS version and dealing with other platforms later. Still, in the past I’ve been bitten by tying a codebase closely to a single platform when the market shifts. This is an open question, but 3.5’s new GUI may be the make or break moment for my Unity support.

How to Talk to Rich People

At certain times in your adventure as an entrepreneur, you may have to talk to the rich and delusional. As many you know, I advise teaming up with someone who specializes in this. Just in case you find yourself unarmed in the presence of a rich guy who is looking to invest in your start-up, here are some tips learned from observing others much better at this than I am.

Oh and, when I speak of weird rich people, I’m not talking about VCs or experienced angels. Most of these guys at least have a semblance of a process and logic behind how they operate. I’m talking about loaded dudes who know almost nothing about your business but are looking to get in on the tech bubble.

Anyway, those tips…

    Ask for something. Have a reason for the discussion. A lot of super rich dudes are just lonely. They break up their solitary existence by inviting you on their boat to have long, rambling, pointless discussions. Have an agenda and don’t be afraid to ask for what you want. Otherwise, you’ll spend hours going in circles.
    Never say no. When you reach a certain level of wealth, you stop hearing the word no. When talking with such people, disagreement is considered “resistance” and jeopardizes the progress of your conversation. You might just phrase “no” in a softer, more creative way. Unless he asks you to drown a basket of puppies or something. In that case, look for a life raft.
    There is no problem that can’t be solved with the simple application of more money. The idle rich do not want to hear about technical limitations of your product that might make their input unfeasible. Worst case, it’s an issue–but can simply be solved with more money. We know this isn’t true–after all, we build stuff. However, being realistic will paint you as a naysayer and killer of dreams. Keep the reality distortion field powered up.

For many, these talents are natural. For nerdy programmer types, talking to money men is usually a learned skill. It’s also a full-time job–you can’t develop a product yourself and raise money simultaneously. Find help.

Is Location Dying?

I was blown away by today’s announcement that Facebook is shutting down Places. A year ago, it was announced as Facebook’s Foursquare killer. Perhaps Facebook decided Foursquare wasn’t worth killing?

It’s kind of bewildering. Pundits complain that only %6 of Facebook users used Places. But %6 of 700 million users is roughly 3-4X Foursquare’s entire user base. It’s really not even about active users anyway. It’s about the reach of Places check-ins through the social graph.

Places activity is featured prominently in your newsfeed. Check-ins frequently generate comments and from non Places users. These conversations can be a valuable viral marketing tool for venues and events. Check-ins on Facebook Places are far more valuable than those of Foursquare or any of its lesser competitors due to their reach.

Facebook has stated they are opting for a new geotagging feature on pictures and posts instead of check-ins. I do like geotagging much more than check-ins, actually. I think this is one of the best features pioneered by Instagram. I’ve gone to venues because I saw something really delicious tagged at a local restaurant. I’m also more likely to geotag than check-in. Checking-in is a big statement compared to adding location information to a post. Still, can’t check-ins and geotagging all just get along?

For developers, location just got a bit trickier. Basing a game or app on check-in history has always been a bad idea. You don’t want to require a log-in for a game–a good percentage of your users will drop out upon seeing a log-in screen. However, Facebook Places offered more of an opportunity to use social check-ins in an app since it’s attached to a mass appeal social network instead of a niche app like Foursquare. Who remembers their Foursquare password?

Places was seemingly thrown out there with very few enhancements made to it over time. Maybe Facebook decided the cost to whip it into shape was just not worth the effort. After all, revenue streams from check-ins have always been suspect.

This goes to show you that even if the 800 pound gorilla decides to muscle in on your turf being focused and nimble can pay off. It was looking grim last Fall, but Foursquare vanquished the beast and has emerged unscathed with a new round of funding.

Facebook will probably use that prime area of real-estate the Places button occupied in the mobile app for a more lucrative feature. Yet, I can’t help but think they didn’t give Places a chance. The fact is, location will remain an important feature in mobile due to the very nature of the device. Facebook just can’t figure out how.

The New Era of Virality

A few weeks back I saw this post covering a lecture about the current trends in gaming by Tim Chang during GamesBeat 2011. Now, if you read a lot of VC blogs, please stop. VCs are very good about telling you what the trends are last year. You’re likely to crash your car doing too much rear-view mirror driving. In this case, during a bunch of stating the obvious, he claims we are in the “post-viral era.”

This may not be the case.

In social gaming 1.0, it was all about spam. Social game developers prided themselves on their secret knowledge of the so-called “viral expansion loop.” This black art really was no secret. Just spam Facebook newsfeeds with obnoxious ‘stories’ about lost cows and Mafia Wars riches. Whether you were selling herbal Viagra or virtual crops, the technique was the same–Shoot out millions of messages and hope that a fraction of a fraction of a percent follow through.

In the late 2000s, it seemed like the there was a fine line between social game companies and Nigerian 419 scams. Newsfeed spam from social games got so bad that Facebook shut down all the viral channels by early 2010. Except, of course, for Zynga–with whom they have a sweetheart deal. Anyway, when the spam APIs were squelched, Facebook app virality died. This was the end of Social Gaming 1.0.

In 2011, virality still lives. Turning your players into evangelists that go out and get others to play the game as a core mechanic is a tricky thing to achieve but it can be done. The best example of this is the wildly popular (among hipsters, at least) turntable.fm.

A pivot borne out of the social shopping startup, Stickybits, turntable.fm is a music sharing game where you earn points by performing as a virtual DJ. Create a playlist of tracks from turntable.fm’s immense library, or upload your own. Then, play these songs for head-nodding virtual spectators.

Is this legal? Who cares. They’ve amassed a decent chunk of users in a few short months. turntable.fm will figure that out later when the Cease-and-Desists start showing up.

The only way to earn points as a DJ is to have a lot of virtual club-goers watch your performance. Racking up tons of points requires driving lots of users to join your room and watch you spin. The more spectators you have, the more points you earn. If you read interviews with the game’s most fanatical players, you’ll see that turntable.fm has created a group of hardcore whales who put more effort into bringing in new players than your average user acquisition manager at a social gaming company.

For fanatical DJs that desire fame, glory, and enough credits to buy cool avatar gear, the drive to bring in new turntable.fm players is strong. Compared to many other social games, there is little friction to this process as players don’t have to actually play anything. Once invited, users merely have to log-in and consume free music.

The big mystery is how this game plans on monetizing its audience–but I’ve seen few social games with viral mechanics this persuasive. It’s unclear if a game you actually have to play to participate in can emulate the same model, however turntable.fm is an example all game developers should be looking closely at.

The Bathroom Pitch

I’m sure anyone who reads this blog is familiar with the elevator pitch. This is a 30 second summary of your start-up designed to persuade unsuspecting business types during short elevator rides. Being concise is a virtue. This is especially true when trying to explain your idea to someone on a Schedule I narcotic.

However, I think many people are unaware of another essential tool in fundraising: the bathroom pitch.

I’ve heard this story many times. An entrepreneur’s dinner with an angel is going swimmingly. It’s the end of a long road of wining, dining, and PowerPoints featuring hockey sticks annotated with 30 point Arial typefaces. Filet is consumed and deal points are discussed. The meal concludes and the angel excuses himself to use the bathroom. The budding entrepreneur follows him in.

In a moment of serendipity, both have to take a leak. Standing side by side at adjacent urinals, the young entrepreneur violates every rule in the Man Handbook. He turns to his wealthy neighbor mid-stream, stares him dead in the eye, and plainly states “I won’t fail.” This bold move shocks and surprises the urinating angel. Deal clinched.

It appears upon a cursory glance that Silicon Valley isn’t very diverse. On both sides of the negotiating table, it certainly is a man’s world. The bathroom pitch is a tool unfortunately not available to females seeking funding.

For those encouraging entrepreneurship in women–Equality won’t be reached until they put more unisex bathrooms in Bay Area wine bars.

Create Your Own Social Proof

If you’ve got balls, you’re not an investor. You’re probably an entrepreneur. Investors really assume no risk–as generally they put other people’s money into stuff that’s already successful. Well, at least perceived to be successful–via track record of the team, traction, or social proof.

Social proof is just short for herd behavior. It’s kind of like how you can’t get a job unless you already have one. It’s why Burger King will build a store next door to a McDonald’s. Hey, if McDonald’s thinks there’s a good opportunity to serve burgers on this block, it must be true.

This is why being in stealth over a unique new business is a bad idea for a first-time entrepreneur with no track record. If your idea is truly without precedent or competition, you probably will have a hard time getting any investor attention as a newbie. The common wisdom amongst the cokeheads is that if nobody else is doing it, it must be a stupid idea.

Talk about the intimate details your concept. Tell anyone who will listen. Announce the product well in advance of its launch. If you’re trying to get funded, your best strategy is to get imitated. Once your idea is implemented and funded by others, suddenly there’s social proof.

Apple Pressed the Reset Button on App Marketing

With a few unannounced decisions, Apple has radically changed the landscape of app marketing. The first shoe to drop was yesterday’s hints that Apple changed the way the App Store charts are ordered. Now, instead of using pure download numbers, it is believed that the App Store charts are sorted using metrics such as engagement (how long users use the app), user reviews, and other data points.

Then, it came across my Google Reader feed that Apple is banning apps that use Cost-Per-Install offer walls from ad networks like TapJoy. As are all Apple rule enforcement changes, this is being applied selectively. However, this is huge news. CPI ads are the most effective way to market apps, period.

CPI ads work like this: an ad shows up in the app you are using. The ad will ask you to install another app. Tapping the ad will open up the App Store to that app’s page. If you install this app, you will receive a reward of virtual currency in the app you were previously using the next time you run it. The advertiser (the publisher of the other app) pays for this ad, and the install fee is split with the ad network and developer of the app the user tapped the ad in.

Ostensibly, you are buying users with CPI ads. But the reality is you are buying a chart position. Users coming from incentivized installs don’t really care about your app. They are installing it just to get credits in the app they saw the ad in. Therefore, users that are acquired via CPI networks don’t monetize very well.

However, by buying hundreds of thousands of installs per month at a rate of 45 cents or more a pop, you could essentially buy yourself a spot on the App Store’s top downloads chart. Users you acquire from the chart monetize far better because they are actually interested in your app.

It was only a matter of time before Apple intervened. This model has come under fire recently because some unscrupulous developers have created rings of non-functional and deceptive apps. These were used as an attempt to harvest cash from CPI networks and other revenue boosting tricks.

Plus, it was always amazing to me that Apple owned the most valuable piece of real estate on the mobile web, the App Store charts, and was allowing random developers to buy their way into it by spending $50k or so with third-party ad networks.

This is as huge a market shift as when Facebook shut down the viral channels awhile back.

The big problem is–how do you market an app now? The old plan was simple: publish an app and see how it monetizes from organic traffic. The next month, buy a ton of users to get your spot in the App Store charts. Observe the metrics from all this new traffic. If the app seems hopeless, kill it. Otherwise, keep iterating, advertising, and monetizing.

Here’s what we know so far:

  • Free2Play isn’t dead. CPI networks are a prime marketing tactic of f2p games. The fact is, it’s almost impossible to convert someone from a CPC ad to an iTunes sale. It’s far easier to convert users from CPC ads to a free app. People will try almost anything for free. Free2Play is still a big part of your marketing strategy.
  • Your game might actually have to be good. To defend your position in the AppStore, you aren’t just going to be able to keep buying users. With Apple’s new engagement metrics, you’re actually going to have to keep users entertained. Which is a novel concept for a new generation of game designers raised on manipulating excel spreadsheets for sales funnels.
  • Branding may actually become relevant. The vast majority of top ranked apps on the charts are unbranded games. Perhaps teaming up with a brand that can get your marketing message out there and generate some kind of call to action will be an effective tool for user acquisition.
  • New forms of virality have to be invented. Perhaps it’s possible to find a new way to virally acquire users without violating Apple’s TOS. Something less blatant than giving people credits for an install. Perhaps creating a network of games that tie together in a less obvious way is a good start.

Today, Apple toppled empires with the flick of a finger. That’s what makes this industry fun.

Tablets: The Next Generation Console Has Already Arrived

It is rumored that Sony and Microsoft will announce their next generation consoles in the 2012-2013 time-frame. Maybe we’ll start seeing hints at E3. A full-blown unveiling seems unlikely at this point. After all, Sony still has the NGP to promote and Microsoft is fresh off the Kinect high. Yet, are next generation consoles already here? Let’s look at some stats.

In a span of 5-6 years, both the PS3 and 360 have globally sold 43.4 and 42.9 million units respectively. The Wii clobbered them both, with about 84.4 million units sold. Nintendo was seen as a disruptive force when the Wii shattered all sales records last decade. However, if you look at software sales for 3rd party publishers, this doesn’t appear to be the case on the content side.

Now, let’s look at the iPad. By the time January 2011 rolled around, nearly 15 million iPads had flown off the shelves. The iPad 2 is forecast to blow by this. It took about a month for the iPad to sell 1 million last year. The iPad 2 sold as many in a weekend. Some forecasts peg worldwide iPad 2 sales at 30 million for 2011. I can’t say I disagree.

In a scant 2 years, Apple will have sold nearly as many tablets as Microsoft sold XBOX 360s since 2005.

What are people doing with all these tablets? They’re not reading eBooks or flipping through The Daily. Naturally, they’re gaming.

The increase in hardware capabilities has also been dramatic. The original iPad was a technically modest device. Apple has remedied this with a significantly more powerful GPU. The iPad 2’s performance gains on its predecessor are significant.

I’m sure the next-next generation consoles will blow us away with their technical splendor. Whether that’s a smart move or not is debatable. Still, at these rates of improvement, the tablet will provide a ‘good enough’ experience with a convenient form factor and media consumption model that is a serious threat to consoles.

Nobody will play an FPS without a dual analog, you cry! I heard the same thing about FPSes on consoles in the pre-Halo era (“Mouse and keyboard is the only way to play!”). Not only does the wider market not care about such minutiae, but they want content that doesn’t adhere to the tried and true control-pad standard.

When I was a kid, I was raised on Atari 2600, ColecoVision, and arcade games. Paying for entertainment you interact with via a joystick is normal to me. The basic business and interaction model remains the same on the modern console.

However, today’s young gamers have been raised on a steady diet of nick.com, PopCap, and Club Penguin. Although the millions of 45-year-old soccer moms strung-out on Farmville will likely never convert to a core gamer, there’s still hope for the next generation. Either that, or the core gamer will be redefined.

A 55 inch HDTV and a $600 console is an alien concept to this new crop of customers. After all, they’re watching video clips on YouTube for hours. A tablet’s convenience is an adequate counter to the ‘quality’ of a living room experience.

Perhaps we can look at the 3DS as a taste of the future. Nintendo’s 3D handheld is the first device from a console manufacturer to launch in the disruptive era brought on by the iOS ecosystem. By some accounts, it’s not really going well.

We may see similar stories about the next generation of consoles when they arrive.

The tech world moves fast. Just a little over a year ago the tablet market didn’t exist. Now we’re talking about it conquering the planet. Just think about the position tablets will be in by 2013. The first sign of things to come will be tablet gaming emerging as a separate genre apart from mobile this year.

My Week with the 3DS

It’s been about a week since I got my shiny turquoise 3DS at launch. I figured I’d share some impressions of this device.

THE BAD

  • This is the most half-ass Nintendo launch in the company’s 120+ year history. This is coming from a guy that blew $179.95 on a Virtual Boy on launch day in 1995! The 3DS is just incomplete. Want to use the browser? Oh that’s coming soon. How about the app store? Oh that’s coming soon. Considering both of these features have existed on the DSi for years, I don’t see how they are absent from the 3DS.
  • 3.5 hour battery life. What is this, an Atari Lynx? Poor battery life is a dealbreaker for a portable system. It won’t even last a round trip in the back seat of the SUV during a family vacation.
  • It’s ugly. I’m not talking about colors–Nintendo’s handhelds always seem have US launches with a garish palette. No matter what color you get, you’re left with a huge, hulking, decidedly unsexy piece of plastic.

    Perhaps the 3DS is designed to be easily gripped by younger hands, but this thing seems to be at least 2X bigger than it needs to be. Whether it’s fair or not, it’s being compared to the iPhone. It’s so huge, I can’t conveniently carry it around with me. Especially since I always have an iPhone in one pocket…which is another one of Nintendo’s big problems this generation.
  • The UI sucks. It’s 2011 and the 3DS needs a stylus. Seriously? I can see why they included the stylus to remain compatible with DS titles. However, for the 3DS interface to use a stylus in 2011 is unacceptable. Yeah you can tap the screen with your fingers, but they still use scroll bars, tiny soft keys, and other interface metaphors designed for stylus use.
  • It’s still using that dumb 3-slot WiFi setup screen. At least it supports WPA/PSK now (like the DSi). You still can’t use WPA/PSK with DS games that use WiFi. In addition to this, you are limited to saving 3 WiFi hotspots. You’d think someone at Nintendo would see how an Android device or iPhone handles WiFi hotspots. Why am I limited to 3? Why can’t I just add and save hotspots like any other modern device?
  • Launch titles are typically weak. Iwata complains that the iPhone is cheapening games by offering very little gameplay at small prices. Yet, many launch titles priced at $39.99 don’t give much more gameplay than free iPhone apps.
  • StreetPass is poorly implemented. Oops–I was wrong here. StreetPass does work without the cart. See this link.

THE GOOD

  • 3D is neat! Honestly, the 3D screen gives me eyestrain after about 30 minutes. I’m really not sure what to think about the after-effects. I do generally like it. Still, holding the 3DS in the right position to be in the screen’s sweet spot is a pain. This is specially evident with button masher games like Street Fighter IV where it’s near impossible to keep the machine steady while playing.

    Even in games without gimmicky camera movements and such, the 3D effect gives a nice ‘volume’ to everything. This makes the 3DS surprisingly immersive for such a small screen.
  • The 3D camera is awesome. It works very well, and has a lot of interesting settings. It would be cool if somehow Nintendo could figure out how to create a relatively cheap lenticular printer accessory. Or maybe install printers at Gamestop etc. that let you print out 3D photos for a fee.
  • The Augmented Reality games are the best I’ve ever seen. A lot of you have probably seen AR features on iPhone apps such as Yelp’s Monocle or games like Ogmento’s Paranormal Activity. The 3DS takes this to the next level with really fun and innovative use of AR. Unfortunately, you still need to use marker cards.
  • Miis have more to do. The Game Coin system (earn virtual credits by walking around with your DS via the pedometer) not only allows you to unlock content in supported games, but also play a few clever mini games with your Miis. No longer are Miis relegated to aimless wandering around the screen. They have stuff to do, including a light RPG quest built right into the 3DS desktop.
  • System-wide friend codes. I do understand Nintendo’s reliance on friend codes. It’s dangerous (and even illegal) to store personal identifying information of minors. Since the 3DS is targeted squarely at kids, friend codes give a safe way for children to play on-line games without weird strangers in the mix. Now, the 3DS uses one friend code per system instead of one per game. Also, the friend browser can be brought up during a game at any time without quitting. Nice.

CONCLUSION

The 3DS doesn’t seem ready for prime time. I’m used to it. This is the price I pay for being an early adopter. However, the fact that Apple sold more iPad 2s at twice the price (for the cheapest model) with heavy supply constraints in its launch week than Nintendo sold of the 3DS may not bode well for Nintendo.

Are they really competing for the same market share, though? Nintendo probably has the younger audience locked down–I mean, the latest Pokemon sold 2 million units during launch week in the US alone.

Oh….and speaking of Virtual Boy….I want a collection of Virtual Boy classics for the 3DS once they launch the on-line shop. Much like the limited edition Game & Watch cartridges for the DS…maybe they can somehow make these a collector’s item too. I swear, there were a few good games on the Virtual Boy!

Favorite 3DS game right now is Ghost Recon.

Oh, here’s my friend code: 4038-6014-0977

An Overview of Geospatial Databases

In preparation for my talk at LOGIN 2011 (and my own location-based stuff), I’ve done a lot of research into using databases to store geospatial information. I figured I’d put a partial brain dump up here. Maybe some of you folks can debunk any of this info before I start spreading misinformation in my presentation slides.

MySQL:

When developing my new platform, my first choice was MySQL. After all, I know how to use MySQL and so do a lot of people. MySQL has had spatial extensions since version 4.1, so it seemed like a good bet. Right?

MySQL stores geospatial information as Well-known Text (WKT) or its binary equivalent, well-known binary (WKB). You can store points, lines, and polygons as well as perform intersection and distance tests on this data.

WKT is an old markup language for geospatial data that’s just a plaintext representation of points and geometry. For instance, if we were to store the latitude and longitude values of 12, -75 as WKT, it would be “POINT (12 -75)”. Simple, eh?

MySQL provides a variety of functions for computing the distance between points, selecting points inside a square, etc. The problem is that all of these calculations occur in Euclidean space. That is, on a flat plane.

As we all know, the earth is round. So, just getting the Pythagorean distance between two points on the globe is going to be really inaccurate. You might get away with it near the equator (where the earth is flatter), or over small distances.

The solution for accuracy is to write your own great-circle distance formula. You can do it inside a MySQL query, or in your business logic via PHP etc. Either way, it’s a huge performance hit.

So, MySQL is out.

PostGIS:

PostGIS is an enhancement to PostgreSQL that adds geospatial features. It works very much like MySQL where it stores location data as WKT or binary. It has the same types of functions as MySQL for determining distance, intersections, etc. The big difference is that PostGIS supports “geographic” coordinates. Which means it can perform distance and intersection calculations on points as they are projected on a globe, not in flat Euclidean space.

I’m not a PostgreSQL expert, but the performance seems good and it’s a very robust RDMBS. Plus, the spatial support has been there since 2001–this is the most mature solution. A lot of geospatial applications have been built on top of it. Much like MySQL, it’s free and open-source.

This is probably the best solution if you want to use a relational database.

MongoDB:

MongoDB is the hip NoSQL database that’s big with all the kids these days. Hey, if it’s good enough for Foursquare, it’s good enough for me!

Last year, geospatial indexing was added to MongoDB. MongoDB stores locations as a geohash. This is a pretty neat way of storing latitude and longitude as a 1-dimensional value. Although, it’s really storing a bounding box, not a single point. Also, geohashes have some weird accuracy issues. I do think MongoDB compensates for this.

MongoDB can only store points–so no polygons or linestring paths. Still, for my purposes this is fine. It has all kinds of easy to use functions like searching for points near a point or inside a bounding shape.

MongoDB only supported Euclidean space calculations for a while. However, the latest version has spherical coordinate checks. This is acceptable, but because the Earth is not a perfect sphere it can be inaccurate. It’s good enough to determine your distance from the local Pizza Hut. Maybe not good enough to plan a Lybian airstrike.

SimpleGeo Storage:

SimpleGeo started out as a location-based gaming company, but once they discovered how bad geospatial tools are, they pivoted to a location middleware play. Their latest service is SimpleGeo Storage, a cloud database optimized for location data.

SimpleGeo Storage is a cloud database service painstakingly crafted on Cassandra. Therefore, you have to access it via HTTP as a web service. This can be a pretty big performance hit compared to a local connection to your database server, so design accordingly.

The API is easy to use. You can associate data with latitude/longitude, geohash, or even an IP address (as it is possible to map IP addresses to locations). As a cloud service, you don’t have as many system/cloud administration headaches either.

Amazon should buy these guys and then offer SimpleGeo Storage instances like they do RDS.

Summary:

There are other solutions too–I noticed there’s a new flavor of CouchDB, GeoCouch, for instance. It seems like if you’re a RDBMS person or need the best accuracy, PostGIS is it. Otherwise, MongoDB is the leading NoSQL solution. SimpleGeo Storage is early, but very promising depending on your performance needs.