Sunday, November 30, 2008

First prototype powered by Google App Engine

Our first game prototype will be built on the Google App Engine (GAE).

GAE supports straight forward development: Scalability, powerful and simple data store, user management, Python :). After some early ideas we figured out, that GAE does not support all useful functions for browser game development, e.g. cronjobs. Also: Google tries to handle requests within (sub-) seconds. No less is expected from developers. If the request does not return after three seconds, the request handling process gets killed.

This means, we have to handle events during a user request and within three seconds.

Until now we found some (strange) work-arounds for these problems like automatically refreshing tabs. The most powerful solution at the moment seems to be Cron from GAEUtilities. Unfortunately Cron works lazily.

For low traffic sites, this may mean cron tasks will not run as often as scheduled. If you only get 1 request every 20 minutes, and you have a task scheduled for every 5 minutes, it will only run every 20 minutes. - GAEUtils Wiki

This does not to fit into the simple tick based browser game view. We still have to consider, that events are not handled at the correct time. If the player supposed to get his credits every 5 minutes then he has to get it 4 times after a twenty minute delay and in three seconds ;)

Additionally after a few hours, we ran into the "datastore_path bug" (SDK v1.1.7). Thanks Google Quality Management!!!

No comments: