views:

96

answers:

1

I'm writing a small browser game and as I'm not a good designer, I wanted to start with the technical part first and add the user interface later, so I wanted to have the first version include bot support, so everyone could write their own bot and have it play the game. This way, I don't have to care about making graphics for the user interface and can concentrate on the game's core while having a steady flow of test data and many testers.

However, I can't decide betweens the various ways of exchanging data between the server (C++) and the clients (any language, but the first reference implementations will be in C++ and Python).
For the transport I thought of offering HTTP and TCP (some simple homebrew protocol), as most languages have beginner friendly implementations of those protocols.

For encoding the data I considered something arbitrarily defined by me (something primitive like CSV), JSON and XML, but I'd like some comments regarding ease of use in C++, easy implementations on various languages and understandability by humans.

What should I do?

+1  A: 

If you're going to be making a browser based game, then the people that will be playing it will be making use of http requests and visiting certain URLs. It makes sense to me to keep your API for the bots similiar to this, rather than duplicating work for yourself. So why not expose your game's functionality through webservices?

As far as possible, I would try to keep the protocol/API as standard as possible. Having to learn your homebrew version is an extra hurdle people have to get over before they can interact with your game.

As for languages, is there a reason you're picking C++ for a browser based game? There are lots of web frameworks out there, but few use C++.

Kirschstein