MArcomage

Free multiplayer on-line fantasy card game

Please log in

antoniocorrenti on 18:04, 5. Dec, 2010
Hi,
I'm new on this community, but I love this game since m&m.
I want to know if someone is developing a game rest api, because my idea was to redesign an html5 of the game or i can offer some help if someone else is already doing it.
just to let you know how I am, I'm an italian web developer, and I think that if I can work a little on the ui and implement some support for foreign languages all the community can take advantage.
ps here is my website http://www.resetstudio.it
Mojko on 08:31, 6. Dec, 2010
Because HTML5 is still not a part of W3C standard, no one is working on such task. Feel free to checkout our source code from our repository. If you want to share your improvements, feel free to send it to me.
antoniocorrenti on 09:49, 6. Dec, 2010
Hi, HTML5 is not the prioity,
I've already checked out via svn the repositories. The code looks good but what would be cool is to have some rest api, so that someone can work parallel at an ajax version of the game (and I would).
The work done until now is really great, and I have really fun by playing the game, but the general user experience could be improved.
By now, every request (made by "location" or "action") on the code returns the whole page, but if only data were returned would be really great (as I said by aving a set of new requests).
I'm not saying that I can't do it, but i'm saying that some help from the creators would be very "helpful" because the source and the work done by now is really huge.
Just imagine the possibilities, with some "data api" it would be possible to build a mobile client for Android Phones or iOs.
Mojko on 10:16, 6. Dec, 2010
I definitely agree that the user experience can be improved with AJAX for example, however I really have a tight schedule until end of this year. I'm already investing all my spare time in this project. If you have any question regarding the code, I'll do my best to answer them, though.

Actually I was planning to implement the rest API a while ago. You see we already use AJAX in some cases and it's far from perfect. If you look at the code, we have main.php to process normal requests and AJAXhandler for AJAX requests. This needs to be redesigned, however it's quite a big task, so hopefully I'll have time at the start of the next year. Of course, your help is appreciated ;-)
antoniocorrenti on 13:02, 6. Dec, 2010
Ok, let me ask
How is the development structured?
How are the commits organizated?
When I structure an AJAX app normally, I have a css selector that can trigger an ajax call, so that no js code is useless repeated.
So for example I have then some php code that outputs a json object with the response (bool), then an array with the "updates" to do on the page with the relative selector and if present a message is send on an alert or lightbox.
By structuring the js this way and by standardizing all the calls, the development is really snappier.
I'll build a proof of concept using your source in the following weeks, I want really to be active on your project but I know I have first to look more deeply and study better the actual source!
Mojko on 14:47, 6. Dec, 2010
antoniocorrenti wrote:
How is the development structured?


We have list of active tasks, some are assigned and some are free. If a developer wants to claim a task he asks others (me for example) if the task, was already taken. If it's free, the developer can claim it.

antoniocorrenti wrote:
How are the commits organizated?


One commit contains usually one change (implementation of a feature or a bugfix) that can't be split into smaller parts in a logical way. We try to make commits as readable and transparent as we can.

In case of exploratory or alternate development, a new development branch is created. In the case that the development branch is finished and tested and the results are as expected, it is merged back to the main branch.

Our AJAX functionality is very limited, only few actions actually use it. Our JavaScript code is located in javacript/utils.js. We currently don't have any interface for sending data from php to JavaScript functions. Standardization of this communication is a good idea.