My friend and I spent about 5 years making an online collectible card game. We started around 2003, around the same time that MTG was reporting scaling issues. Their scale issues inspired me to architect a game server that was horizontally scalable-- theoretically infinitely.
Our game, from the start, was built to: 1) playable from the web with no client (1mb flash, I suppose) 2) bi-directional socket based to avoid polling and be snappy 3) server is scalable horizontally 4) adding complex cards and rules will not require a client update and would be easy.
We managed to complete all these goals and produce what I still consider to be our magnum opus of software development.
The scaling worked by having socket servers provide the end-point to the client, and then behind the socket servers were chat services, game services, trading services, card building services and deck services. So, lets say we had 4 socket servers running: you and I might end up on different socket servers, but we could still play against each other because all the socket servers are doing is relaying your commands to a game server that is running our game. In order to scale, we just add more servers. (Also, if we get disconnected you can reconnect easily. Also, spectating is easy.)
My friend came up with the idea of making the Flash front-end use generic commands. So instead of the server telling the front-end "Ship A attacks Ship B for 5 damage" it says "Draw a red arrow from Card #123 to Card #456 and display a red number 5". This allowed us to make cards that did all kinds of crazy things without having to do anything to the client. To implement a card that does damage to all of a player's ships you just have to update the server to send the command "Draw a red arrow from Card #123 to Card #456, Card #789, etc...".
Finally, the core game engine on the server was an event loop. Thus, making new cards and rules was super easy because all you had to do in code was say "I want this new card to subscribe to the Player Draw Card event, and in that event code: "if drawer is this.owner, draw twice the amount as regular and then this.sendtograve." I was continually blown away by what crazy cards we could make up and how little code it took to implement.
As we were creating this game our day jobs became more and more serious and when we finally had the final version complete we both agreed to burn the code and resources to DVD and put it on the shelve. The idea of starting a new journey in marketing and building a company was overwhelming. (Just three months ago I got it all running in the cloud with very little effort for nostalgias sake).
I still think about pinging WOTC and asking if they'd like to see what we have and maybe make use of it. I knew WOTC had an online version of MOTG but I had NO idea it had so many rough patches or I would have been down in front of their office with a sign asking them to look at what we have.
If anyone from WOTC or other would like to see or talk about the game, feel free to message me.
Comments
My friend and I spent about 5 years making an online collectible card game. We started around 2003, around the same time that MTG was reporting scaling issues. Their scale issues inspired me to architect a game server that was horizontally scalable-- theoretically infinitely.
Our game, from the start, was built to: 1) playable from the web with no client (1mb flash, I suppose) 2) bi-directional socket based to avoid polling and be snappy 3) server is scalable horizontally 4) adding complex cards and rules will not require a client update and would be easy.
We managed to complete all these goals and produce what I still consider to be our magnum opus of software development.
The scaling worked by having socket servers provide the end-point to the client, and then behind the socket servers were chat services, game services, trading services, card building services and deck services. So, lets say we had 4 socket servers running: you and I might end up on different socket servers, but we could still play against each other because all the socket servers are doing is relaying your commands to a game server that is running our game. In order to scale, we just add more servers. (Also, if we get disconnected you can reconnect easily. Also, spectating is easy.)
My friend came up with the idea of making the Flash front-end use generic commands. So instead of the server telling the front-end "Ship A attacks Ship B for 5 damage" it says "Draw a red arrow from Card #123 to Card #456 and display a red number 5". This allowed us to make cards that did all kinds of crazy things without having to do anything to the client. To implement a card that does damage to all of a player's ships you just have to update the server to send the command "Draw a red arrow from Card #123 to Card #456, Card #789, etc...".
Finally, the core game engine on the server was an event loop. Thus, making new cards and rules was super easy because all you had to do in code was say "I want this new card to subscribe to the Player Draw Card event, and in that event code: "if drawer is this.owner, draw twice the amount as regular and then this.sendtograve." I was continually blown away by what crazy cards we could make up and how little code it took to implement.
As we were creating this game our day jobs became more and more serious and when we finally had the final version complete we both agreed to burn the code and resources to DVD and put it on the shelve. The idea of starting a new journey in marketing and building a company was overwhelming. (Just three months ago I got it all running in the cloud with very little effort for nostalgias sake).
I still think about pinging WOTC and asking if they'd like to see what we have and maybe make use of it. I knew WOTC had an online version of MOTG but I had NO idea it had so many rough patches or I would have been down in front of their office with a sign asking them to look at what we have.
If anyone from WOTC or other would like to see or talk about the game, feel free to message me.
You should put up a youtube screencast or demo of your game. It'd be a great portfolio piece at work, seems like some solid decision-making