Re: Turn-based game - experimental economics



In data sabato 05 settembre 2009 21:47:41, Dennis Lee Bieber ha scritto:

Much better to just send the token TO the active client (which is
responsible for returning it at the end of its turn processing)

Dennis,

I am finally getting my head round this problem. I do have a further question,
though.

I am using XMLRPC as server. It is quite convenient since it handles all low-
level network stuff for me. On the other hand, though, it seems I cannot make
the server actually _send_ anything to the clients; it just sits there and
waits for calls.
This is rather inconvenient for me, as every time I need to send the clients
some information (eg, the state of the game) I have to formulate the problem
as a specific call from each client. This can indeed be done quite easily, but
the end result is a staggering amount of calls to the server, and high cpu
usage - this might as well slow down the network in the lab, I guess.

If you look at the pseudocode you sent me - and I implemented - you see, on
the clients side, where the -->**** are, that a call to update is made over
and over again.

-=-=-=-=-=- "Display"

connect to "game"
ACTIVE = False
while True:
get game data ---> *****
update console display ---> *****
ACTIVE = game data == active token
if ACTIVE:
get user input
if user input == EndTurn:
ACTIVE = False
send user input
if user input == QUIT:
break
disconnect from "game"


Is there any way of telling XMLRPC 'send this and this to all clients
connected'?
Or should I use another server-side technology? I have no much experience in
writing network programs - this is my first - and I'd rather not go into
complicated stuff.

Thanks!
--
Paolo Crosetto
---------------------------------------------------------------------
PhD Student in Economics
DEAS - Department of Economics - University of Milan
---------------------------------------------------------------------
.



Relevant Pages

  • In-game players kicking in the Quake 3 engine
    ... The Quake 3 engine is the well known game engine developed by ID ... the server will automatically disconnect showing the ... Only in Soldier of Fortune II happens a clients crash instead of the ...
    (Bugtraq)
  • [Full-disclosure] In-game players kicking in the Quake 3 engine
    ... The Quake 3 engine is the well known game engine developed by ID ... the server will automatically disconnect showing the ... Only in Soldier of Fortune II happens a clients crash instead of the ...
    (Full-Disclosure)
  • Re: Turn-based game - experimental economics
    ... Turn-based game - experimental economics ... game as server functions, called by a client. ... States of players and of words ... I basically need the server to freeze in writing all the clients while client ...
    (comp.lang.python)
  • ISA2004 on Small Business Server 2003
    ... My SBS2003 server has dual NICs behind ADSL. ... the XP SP2 clients are unable to correctly view the Internet games. ... We can see the game servers but can never connect. ... out of the SBS subnet directly on to the ADSL subnet, ...
    (microsoft.public.isa.configuration)
  • RE: games on XP client running 2003 server (UT2004)
    ... I understand that you do not have ISA server installed, ... Can you play the game on the server or another client workstation? ... Help to gather the ISA Logs: ...
    (microsoft.public.windows.server.sbs)