A
Alex
Hi,
I am trying to build a webapp with servlets that runs several games
concurrently. I was hoping to have each seperate game run in the background
by a seperate servlet instance, where requests are forwarded to the
instances by a GameMaster servlet.
It would be possible to do this if there were a fixed number of games, by
simply naming Game1 - Game6 in web.xml, but I was hoping to let games be
created and ended on-the-fly and I don't know if this is possible.
Does anyone have any suggestions?
I probably haven't made much sense above so I will include a paragraph from
www.acknowledge.co.uk which explains what I am trying to do, but only with a
fixed number of games:
"There is one servlet instance per registered servlet name. But why? Well
say you have a servlet class that is a front end to a game called Vengance
that is played over the Internet. Vengance is a multiplayer game that can be
run in either death match mode or team match mode. The Vengance servlet uses
initialisation parameters to determine which mode the game should be played
in. Although we have one Vengance servlet class, we need two servlet
instances. We name one servlet instance DeathMatchVengance and the other
TeamMatchVengance. They are two totally different games, two totally
different servlets, that are accessed by two totally different sets of
players. In short we need two different servlets that are instantiated from
the same servlet class. We can achieve this by registering the Vengance
servlet class under two different names. Also we configure these two
Vengance servlet instances take different initialisation parameters, one for
team match mode and the other for death match mode. Hence, the reality is
one servlet instance per registered servlet name."
Thanks for your help,
Alex
I am trying to build a webapp with servlets that runs several games
concurrently. I was hoping to have each seperate game run in the background
by a seperate servlet instance, where requests are forwarded to the
instances by a GameMaster servlet.
It would be possible to do this if there were a fixed number of games, by
simply naming Game1 - Game6 in web.xml, but I was hoping to let games be
created and ended on-the-fly and I don't know if this is possible.
Does anyone have any suggestions?
I probably haven't made much sense above so I will include a paragraph from
www.acknowledge.co.uk which explains what I am trying to do, but only with a
fixed number of games:
"There is one servlet instance per registered servlet name. But why? Well
say you have a servlet class that is a front end to a game called Vengance
that is played over the Internet. Vengance is a multiplayer game that can be
run in either death match mode or team match mode. The Vengance servlet uses
initialisation parameters to determine which mode the game should be played
in. Although we have one Vengance servlet class, we need two servlet
instances. We name one servlet instance DeathMatchVengance and the other
TeamMatchVengance. They are two totally different games, two totally
different servlets, that are accessed by two totally different sets of
players. In short we need two different servlets that are instantiated from
the same servlet class. We can achieve this by registering the Vengance
servlet class under two different names. Also we configure these two
Vengance servlet instances take different initialisation parameters, one for
team match mode and the other for death match mode. Hence, the reality is
one servlet instance per registered servlet name."
Thanks for your help,
Alex