Page 1 of 1

Public web-service interface to support multiple front-ends

PostPosted: Fri Oct 05, 2007 10:53 am
by dmgambone
<Subject>:
Concise Idea - ConquerClub web service to provide all functionality via a web-service so that different people can develop different types of front-ends without having to do screen-scraps.


<Body>:


Specifics - The CC game logic could be modified to support web-service interface. You're basic methods needed for web-service support are:
    Authenticate - Authenticates the person using the front-end and returns a token that they must provide in all other web-service calls
    GetMyGames - Gets basic status of all the user's games
    MapUpdate - Gets all current map information and timer information
    LogUpdate - Gets all log information (relative to the user)
    ChatUpdate - Gets all chat (relative to the user)
    BeginTurn - Indicates the user is starting their turn
    EndTurn - Indicates the user is ending their turn
    GameAction - Indicates an in-turn action (i.e. Submit cards, attack, fortify, deploy)
    LogOut - Indicates the user is logging out
Items that need to be addressed if implemented:
    - Prevention of Web-Service call flooding (i.e. a front-end sending update requests at .1 second intervals)
    - Prevention of sending any non-user relative information such as what cards the opponents have.
    - Indication of the which users are using which front-ends and ability to allow only CC based front-ends in their games.


Why it is needed - It's not needed, but the results could be beneficial to CC in the form of more front-end options for the players. It could also benefit CC by separating the logic from presentation, the presentation code can be updated and changed without ever modifying the game rules/code and vice-versa. Since there is this logical separation, physical separation can also occur by moving game code or presentation code to another server (if desired), providing better stability and performance.

Also, a properly developed front-end could significantly cut down on the bandwidth. Not everyone is interested in the history and, in reality, the game log can be send at a much less frequent interval than map updates and chat updates (possibly even on-demand).





I realize that the current code structure of CC probably is not going to lend itself nicely to this idea, but I wanted to throw it out there and see what others think. I already saw someone, who was bored, try to develop a flash front-end version of CC and this would help that project out immensly.

PostPosted: Fri Oct 05, 2007 10:59 am
by Optimus Prime
I don't exactly understand what all of this means, but I'm sure that the other programmers like Lack and so on do. It sounds pretty nice and fancy though.

PostPosted: Fri Oct 05, 2007 11:26 am
by Aerial Attack
This is a very nice and very ambitious idea. But, the biggest problem is that people who are good programmers will be able to figure out a way of tricking CC into thinking that valid data has been received.

For example:

1. Yellow (Siam) attacks Green (Indonesia).
a. Call is made to CC to call Random.Org for the dice roll
b. Results are assigned to a variable and checked to see who wins/loses the battle.
c. If the result is not favorable for Yellow (the programmer), variable is reset to a random combination (pulled only from winning dice throws).
d. Return the "validated" response to CC.

And viola, we have a new Conqueror (helps to never lose an army whilst attacking, eh?).

PostPosted: Fri Oct 05, 2007 11:47 am
by dmgambone
Aerial Attack wrote:This is a very nice and very ambitious idea. But, the biggest problem is that people who are good programmers will be able to figure out a way of tricking CC into thinking that valid data has been received.

For example:

1. Yellow (Siam) attacks Green (Indonesia).
a. Call is made to CC to call Random.Org for the dice roll
b. Results are assigned to a variable and checked to see who wins/loses the battle.
c. If the result is not favorable for Yellow (the programmer), variable is reset to a random combination (pulled only from winning dice throws).
d. Return the "validated" response to CC.

And viola, we have a new Conqueror (helps to never lose an army whilst attacking, eh?).


That can't happen simply because all the game logic is still done by the CC server, none by the front-end. The front-end is for presentation only.

PostPosted: Fri Oct 05, 2007 2:24 pm
by lackattack
You're too ambitious, dmgambone.

I have so much on my to-do list I don't see this happening for at least the next 6 months.

PostPosted: Sat Oct 06, 2007 7:39 am
by dmgambone
lackattack wrote:You're too ambitious, dmgambone.

I have so much on my to-do list I don't see this happening for at least the next 6 months.

I figured as much, just thought I'd throw it out there.