I've recently decided to start writing an engine for a card game. I'm not a big "cards" player, but a friend introduced me to the game (it's a spin on the game Danish), and I fell in love.
I want to develop the game in 3 segments:
- The basic engine, handles cards/decks/gamestate, etc.
- A user interface (in the form of a mobile/desktop web app.)
- An artificial intelligence with various strategies/difficulties, etc.
These are very distinct projects, in my mind... and I'm struggling with seeing how they'll all fit together in the long run. At first, I don't even want to be able to "play" the game using the engine. The engine will primarily be tested by its unit tests. Play testing won't start until a client exists. So there's something of a client-server relationship here.
The engine is a very large piece of the puzzle. What I'd like to know is: how would you go about developing the "public API" for this engine?
I was thinking the engine could be a very basic web service, that returns its state via queries to a RESTful API, but I'm worried that developing the engine itself as a web app may lead to poor programming decisions. (For instance, if I chose an MVC micro-framework, well, this API wouldn't really have views... it's just returning serialized objects via JSON, or something to that effect. Is it bad to use MVC for a service like this? )
My other idea was that the engine would just be a console app, and I would later write a bridge of some kind to pipe data between it and the web-app. (The bridge could really be anything. I mean, the web server and the game engine could both idle in an IRC server and share their state in channels.)
What approach would you take (develop as a web service, or develop as a standalone app and bridge it later), and why?
EDIT: So I guess this belongs in Game Development. To clarify, I'm going to write a card game engine. I'm trying to figure out the best way to expose the engine's API so it can be integrated in the future with a web client, and an AI client.
I didn't even have an account here, so howdy :)