Ventures of an ex indie game developer

I was able to deploy and run my Google App Engine app through my domain by first setting up some DNS TXT to authenticate that I was the owner of the domain, then adding a CNAME to refer to the application running on a Google server somewhere. So now it is running at and I have a C++ interface working through HappyHTTP, so now all I have to do is add the logic to my game. Should be a piece of cookie.

The server-side Python app is only some 200 lines which includes some shady security stuff, Google's database read/writes, a hand-made JSON writer (Python 2.5 in GAE has no built-in JSON support) and the no-longer working HTML interface. If it gets hacked I'll add HTTPS and challenge-response, but I suspect I'll have to make a good game first to attract some hackers, and it sure ain't gonna be Kill Cutie, since the iOS controls sucks ass.

This is the Python object to JSON writer (run with myjson.dumps(o)):

class myjson:
  def tostr(o):
    "Converts input object to string."
    if type(o) == dict:
      return '{' + ', '.join([myjson.tostr(k) + ':' + myjson.tostr(v) for k,v in o.items()]) + '}'
    elif type(o) == list:
      return '[' + ', '.join([myjson.tostr(e) for e in o]) + ']'
    elif type(o) == unicode:
      return repr(o)[1:] # Something along the lines of u'\xe5asdf\xe4\xf6\xe5'
    elif type(o) == long:
      return str(int(o)) # Typically 97L or so.
    elif type(o) == str:
      if len(o) < 2 or o[0] != '"' or o[-1] != '"':
        return '"' + o.replace('"', '\\"') + '"'
      return o
      return str(o);
  def dumps(o):
    "Tries to emulate json module in Python 2.5 and newer. Simple enough."
    return myjson.tostr(o).replace("'", '"')

On the client I do something like:

Cure::HiscoreAgent lHiscore(_T(""), 80, _T("GameName"));
lHiscore.StartDownloadingList(_T("Platform"), _T("Level"), _T("Avatar"), 0, 10);
while (lHiscore.Poll() == Cure::RESOURCE_LOAD_IN_PROGRESS)
Cure::HiscoreAgent::List lHiscoreList = lHiscore.GetDownloadedList();

// or:

lHiscore.StartUploadingScore(_T("Platform"), _T("Level"), _T("Avatar"), _T("me"), 1234);
while (lHiscore.Poll() == Cure::RESOURCE_LOAD_IN_PROGRESS)
int lMyPosition = lHiscore.GetUploadedPlace();

About the author

Mitt foto
Gothenburg, Sweden