I started off with a question about a year ago.
My question was "Can I use Drupal to create a game that is playable by players”?
To build it in Drupal I had to think differently from what i used to CMS or OOP.
My most basic idea was that I will define a set of Entities that acts as my “game”.
Game – is the static game that will hold a title, description and some preset fields that will by determine by game type.
Game type – is the bundle of game and allows it to be field able.
Running game – is a running instance of the game at hand.
Player – is a slim user that will not relate to Drupal users (you don’t have to Register in order to play a game).
My basic thought was that everyone can run it even in shared hosts so for my demo I won’t use open-socket or any other of complicated technologies.
I said let’s use Ajax called in small intervals just for demonstration reasons.
In order to relay messages to several clients in an unsynchronized matter I needed to add another entity
Command – Each command is a set of action to perform on each client.
From there I started programing my basic example...
My basic example was TIC TAC TOE...
I created an interface for that that can be played.
I used Rules module as a source of building games.
I have attached all my logic of TIC TAC TOE to the rules module in a way that I can allow a non-programmer to create or edit game logic.
Here’s the code it’s an alpha version so use it on your responsibility.
also got a demo site running
To play games no authntication needed.
You need to connect from 2 browsers to play.
TicTacToe or Chess
I would like to hear what you think about it ?
if you want to know how it works i still didnt make the specs for developers and for game editors. For now use the code or ask questions.
|Game Entities (2).jpg||31.78 KB|
|EDA Implemented on rules module (1).pdf||26.82 KB|
|Chess Piece Move Condition.png||43.4 KB|