Simple Android template for new Game using an Entity System

If you’re working with Android, you quickly find that Google forgot to include some core things in the OS. Getting a “Hello World” application to run on your phone requires many hundreds of lines of code, 90% of which you’ll never change from application to application (i.e. it should have been built-in to the OS).

NB: you can do a fake “Hello World” on Android in literally 10 lines of code – but it’s not a real app. It only exists to pretend that Android is correctly configured by default – i.e. it’s a marketing hack :) .

If you’ve been using the free Entity System libraries over at http://entity-systems.wikidot.com, the Java versions need to be manually integrated into each new Android project. The Objective-C versions don’t need any integration – the default templates for iPhone/iPad projects work fine – it’s just the Java/Android ones that need work.

So, here’s a pre-made template you can use for starting new Android games / Entity-system projects. It starts up and draws a starfield, so you can confirm that the render-loop is running, and animation is working. It also shows that auto-rotate is configured and running (by default, Google doesn’t provide this):

https://github.com/adamgit/Android-Starting-Project-with-basic-Entity-System

NB: the code provided works fine – but the Activity-integration could probably be done a lot better. I just ripped it out of an old project, so I’m sure it works – but it could be a lot more elegant.

Post-Install

The Entity Systems libs are constantly being updated, so the project above does NOT include any particular version – you have to download the lib you want separately. Install instructions are in the README (which also shows up as the main body of that webpage above).

NB: if you don’t know what Entity Systems are, none of this is of help to you! Go have a look at Entity Systems are the future of MMOG development – Part 1.

(it’s a coding / design technique for making computer games faster / easier to write and maintain)

iPhone and Android owners use: 0.5GB / month data

Designing an iPad or Android Tablet app, and wondering if you’re asking users to download “too much” data while using it?

We know that “unlimited” data packages often run a 1GB / month soft-cap, or 3GB / month if you’ve got a long-running contract – but how much of that do people actually use?

Are they running at the limit, or do they have hundreds of meg to spare?

Well … according to Nielsen, the average North American iPhone/Android user is already grabbing approx 500MB of data each month

Google App Design vs. Apple App Design

A wonderful example of how Google and Apple (seem to) approach design fundamentally differently – and of why Google has failed so heavily with Android handsets – courtesy of TechCrunch:

Wow, Google Has Ported My Ten Thousand Button Nightmare To The iPhone!

Don’t get me wrong – Android itself is doing very nicely indeed (sales figures approaching parity with iPhone / iPod Touch / iPad) – but … remember how Google used to sell phones, only a year ago?

Remember how the Nexus One was, supposedly, the first of many?

Hmm.

A lot went wrong. I met some of the Google staffers from the handset project around the time, and listened to them talk about what made their phone great. They kept going on about technical features such as “voice control is amazing!”, while ignoring the practicalities (e.g. at the first demo I saw, they couldn’t get a good enough signal, so the voice control kept failing – every single time. Took them 3 minutes to do what you’d have done in 10 seconds just by typing).

All through, it seemed Google employees couldn’t conceptualise the idea of a product being appropriate for the user.

They were full of words like “simple”, “easy”, “fast” – but refused to put them into the context of a real person. They never stopped to think: “in theory, voice may be “fast”, but in practice: is it?”.

And so … looking at the Google Remote app referenced in the TC article … I’d imagine they thought to themselves they were being clever: they’ve taken a real-world paradigm, and cloned it. It should be “familiar to ordinary people”, it has “every button you need”, etc.

But they probably never stopped to ask themselves: does anyone actually WANT it to work this way?

How to make Angry Birds: 51 failures and years of experiments

I thought this was interesting reading for anyone looking at App Store success / failure. All the obvious stuff is in there towards the end (e.g. things about working with your fanbase, answering every email – even leveraging non-english-language stores to get enough momentum that publishers will even talk to you, etc) – but to me the unusual points are more about how many failures they were *expecting* in order to get their success:

http://www.wired.co.uk/magazine/archive/2011/04/features/how-rovio-made-angry-birds-a-winner?page=all

“First they had to save a company in crisis: at the beginning of 2009, Rovio was close to bankruptcy. Then they had to create the perfect game, do every other little thing exactly right, and keep on doing it. The Heds had developed 51 titles before Angry Birds. Some of them had sold in the millions for third parties such as Namco and EA, so they decided to create their own, original intellectual property. “We thought we would need to do ten to 15 titles until we got the right one,” says 30-year-old Niklas.”

“When Mikael rejoined the company at the beginning of 2009, he and Niklas sat down to work out a rescue plan. The app store was the integral part. They would continue to work for hire to make ends meet, but at the same time develop their own iPhone games, abandoning other platforms. “The iPhone was a hyper-competitive environment,” says Mikael. “If we succeed there, we can go to other smartphones. And if we do well there, we can go to PC and console, and beyond.”

“Mikael dedicated a budget of €25,000 (the final cost would be four times that) and the team worked on it as a hobby project: “Whenever we had slack time we would do this,” says Niklas. During the six months that the team worked on the game, they produced another four games for other companies. Rovio continued to refine the game into the winter.”

” Angry Birds was Rovio’s 52nd title.”

Android Apps: FINALLY on the web!

For the last 2 years, if you were interested in an Android app, and wanted to know more … you couldn’t. Google weren’t allowing anyone to browse the store from a web browser (even though that’s essentially what their handsets were doing).

This made it MUCH harder to find legitimate apps, MUCH harder to purchase them (the handsets are a terrible browsing platform), and in practice prevented sharing apps with others (there was no clickable URL that you could e.g. embed in a blogpost).

So, now look at this, the link for an app we worked on last year:

http://market.android.com/details?id=com.Heatwave.SamDroidExplicit

The marketplace site is very fast, and nicely laid-out (like the App Store, this is all auto-generated by Google). IMHO the layout and arrangement is better than Apple’s – less clutter, easier to scan through visually. It will probably fill-out over time (it’s very ascetic right now), but it’s a great start.

It’s taken Google a long time, but it’s a good step in the right direction…

30 standard things the Nexus One CANNOT do

This is a reference post: I’m hoping that some/most of these issues are about to be fixed/disappear. I want to cross-reference this after Google’s latest OS update goes live. I’ll be coming back to this post, and seeing how much it’s changed (I’m hoping for big improvements).

Why now?

…Google is in the process of updating Android from version 2.1 to 2.2

…Despite such a small version number, this change is enormous, fixing basic issues with terrible performance

…The Nexus One has sold abominably badly compared to the older, weaker, slower iPhone, and the Android Market is mostly filled with amateurish rubbish…

What’s wrong with this phone? Basically, it’s designed for Google Engineers, not for normal people. Here are some observations I’ve made using it as my main phone for a couple of months.

30 things the Nexus One can’t do…

These are taken from my notes scribbled down quickly. I’ve double-checked all of them, but the details are brief. Some of them are so huge it’s amazing they shipped (for instance: under a standard setup, Gmail doesn’t send any emails, but claims it has – 100% of the time).

Send web forms that use javascript

…for instance, the popular StackOverflow.com site literally cannot be used, because Google’s web browser refuses to submit the search form

Take a screenshot

…which might partially explain why so many Android apps are so ugly – it’s very hard for consumers and reviewers to critique them

Use the correct cell-network / Disable cell-network roaming

…it jumps from your network to foreign networks (may be slower, probably are more expensive) if your network signal drops – but it NEVER returns!

Search your email locally

…the mail client refuses to search the locally-stored email, will only use Google’s webservers for searching

Attach a file to an email

…you are only “allowed” to attach photos, despite the built-in SD card and USB-storage. Unlike with iPhone, where you aren’t allowed access to the files in the first place, Android gives you files and storage … but won’t let you email them.

Type “…”

…the auto-correct thinks you put a space before a period. It is hard-coded to prevent you … from preventing it … from “correcting” your grammar. Unlike spelling-correction, you *cannot* prevent this. Grammar-fascists for the win!

Download files from the internet

…”this content is not supported on a phone” (why is Google judging what I am and am not “allowed” to download?)

Add a new label to an email in Gmail

…the core functionality of Gmail? Not implemented in the Gmail client

Scroll the content of webpages (if they use iframes)

…many websites can’t be used at all, because of the way they embed their content inside iframes

Comment in Disqus blogs for major news sites like VentureBeat

…the web-browser is so antiquated/buggy that it can’t handle the javascripts Disqus is using these days

Play videos from (Google-owned) YouTube: “Sorry, this video cannot be played”

…90% of YT videos embedded in webpages don’t load; most YT videos on the YT site don’t load either. Seems to be a bug in the YT app itself (it gives up with this error message … randomly)

Silence the keyboard while typing

…iPhone has a button on the side which silences it immediately, no matter where you are or what you’re doing

Use the web browser to go straight to a website

…it tries to use Google search instead; every letter you type causes data to be sent/received to Google search engine

Auto-correct words that are incorrect will live forever

…there’s no way to give the dictionary “new” words it doesn’t know, or to remove “old” words that you would never use (for instance, on Nexus One you cannot type “reading”, because there’s a town called “Reading”. Tough luck.)

You can’t go forward to the app you just opened

…you can go back, but don’t hit that “magic hardware back button” one time too many, or you’re lost

If you make a typo in a search, you have to re-type the entire thing

…Google deletes your search – in every app – every time you try to edit it

Correct a typo – even a single letter – when typing a website address

…because Google’s web-browser has no address-bar, only a “search” bar

Copy the web address you’re loading

…*really* important since it won’t allow you to edit the address if there’s a typo

You can’t sort App Store apps

…no idea why not, we’ve had this in most apps for more than 15 years

Unless you’re quick, you can’t see if you have waiting emails

…the scrollball glows with new emails, but only once

You can’t see the first half of your SMS messages when they arrive

…because the message starts displaying BEFORE the screen has unlocked (someone at Google forgot the animation timings)

You can’t write a smiley – i.e. “:)”

Google “auto-corrects” it for you, and deletes it

You often can’t click links on a webpage, even on Google.com searches

…The hit-detection in the browser is very very badly broken – should never have been launched with such huge bugs

You can’t rotate to the right

…Google’s apps only allow you to rotate to the left; they ignore you otherwise

You can’t move in text with the scrollball

…the sensitivity is wrong by a factor of 5 or more, and you cannot change it

Re-try a web address if you lose signal before it loads

…google’s browser sends you back to the previous page for no apparent reason

You cannot send an SMS to a phone number by simply typing the number

…50% of the time – at random – typing numbers in the “Messaging” app causes auto-complete to “not run”. It doesn’t matter that the number is in your addressbook – Nexus ignores this.

If someone emails you their cell number, you cannot phone them

…you have to find a pen, and a piece of paper, and manually copy the number from the email onto paper, then open the phone app, and type it in. (This also applies to the millions of people who include their contact details in their email SIG: Google won’t allow you to use that info)

Google Calendar is “unsupported” by Google’s Nexus One

…you cannot share calendars with other people; you cannot add or remove people to existing calenders. If you attempt this via the website, in desperation … Google’s website gives you an error message. If you persist, it doesn’t work. It goes haywire if you try to add people to your calendar.

Multi-touch often doesn’t work

…See this video: http://androidandme.com/2010/03/news/is-multitouch-broken-on-the-nexus-one/

No “quick on” button

… only the very stiff, small, power button on edge of case – the scrollball on the front can’t be used to switch on

Not allowed to know the sender of incoming emails

…you can only know the name, and the list of all “possible” email addresses that match that name

No “compose email” button

… you have to press a menu button, wait for it to appear, then the compose button becomes available

Cannot read (or edit) outgoing emails

…if an email fails to send, or is pending, you are only “allowed” to view the first 10 words

Delete accidental outgoing emails

…cannot even view the Outbox, let alone remove items from it

Send emails from Gmail never actually send

…if background synch is disabled, gmail claims it is “sending”, and then implies it is “sent”, but it’s a lie :)