Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java Multiplayer Game

77 views
Skip to first unread message

William Yuen

unread,
Oct 21, 1999, 3:00:00 AM10/21/99
to
Dear all,

Is it a MUST to run a Java program on the Web server in order to provide a
multiplayer game on my website ?

It is very difficult because those ISPs they don't allow me to run a program
in their server.

What other method I can use ?

Thank you.

Best Regards,
William

Andrew Gower

unread,
Oct 21, 1999, 3:00:00 AM10/21/99
to
>Dear all,
>
>Is it a MUST to run a Java program on the Web server in order to provide a
>multiplayer game on my website ?

As far as I can tell it's pretty much the only sensible way of doing it
unfortunately. There are a few alternatives, although they aren't as good.

1) You could use a cgi to control the games instead, (if they are turn based
like chess, draughts etc...) The java applet would then need to poll the cgi
every so often (say 5 second intervals) to see if the other player had made
a move, or new data was available. Not very efficient! but it would work.
(www.virtualave.net provides free web-space and allow you to install and run
your own cgi's).

2) Alternatively you could digitally sign the java applet, and request
security privaleges to open sockets at any IP address. This would bring up
an annoying dialog box on the users computer, but if they pressed yes, you
could then connect to any computer at all. (i.e not necessarily the
webserver). This would enable you to do peer-2-peer networking. You would
still need a cgi to keep track of everyone connected, but at least you
wouldn't have to poll it every 5 seconds.

----
Andrew Gower
visit: http://www.jagex.com
-----

William Yuen

unread,
Oct 22, 1999, 3:00:00 AM10/22/99
to
I think the Java Servlet is the best option for me. But here in Hong
Kong, I have asked many ISP, all of them they don't allow me to run Servlet
programs....

But I can use CGI and MySQL, do you think I can use them to simulate a
central game server ? I am new to both, I don't know they could do to job or
not, do you have any suggestions ?

I think a central game server thing is important, because I want to do
something like www.zone.com , there will be some table on the Applet and
allow the user to join in to play chess, etc.

On the other hand, do you know is there any ISP in other country will
support Java Servlet ?

Thank you very much !

Regards,
William Yuen

Andrew Gower <mran...@nospam.bitsmart.com> wrote in message
news:7umvmv$sr3$1...@pegasus.csx.cam.ac.uk...

Andrew Gower

unread,
Oct 22, 1999, 3:00:00 AM10/22/99
to
>I think the Java Servlet is the best option for me. But here in Hong
>Kong, I have asked many ISP, all of them they don't allow me to run Servlet
>programs....

There is no need for the server program to be written in Java at all, let
alone be a servlet, it is totally feasible to have a server written in C
which your Java applet connects to, obviously you wouldn't be able to use
RMI this way, but all the socket based communication stuff is pretty much
the same in both languages. You might have more luck finding an ISP that
lets you run a small C program which binds to a port and controls the game
(since unlike a servlet this doesn't require special software or libraries
to be installed).

>But I can use CGI and MySQL, do you think I can use them to simulate a
>central game server ? I am new to both, I don't know they could do to job
or
>not, do you have any suggestions ?


A CGI could certainly do the job to a certain extent. You could easily write
a CGI which when called opens a port, which the java applet then connects to
for proper 2-way communication. It would be best to make it so the CGI
terminates at the end of each game, and is then restarted by the next person
requesting a game, since if you have any process which is running for more
than a few mintues on the server your ISP might notice, and not like it!
Keep the cpu and memory costs low though, and I doubt they would complain.

>On the other hand, do you know is there any ISP in other country will
>support Java Servlet ?

I know of none! If you are willing to pay enough you can pay to get an
account on a linux or solaris box connected to the internet, on which you
can run anything you like. But you normally have to pay all bandwidth and
connection costs...

Jos van Uden

unread,
Oct 22, 1999, 3:00:00 AM10/22/99
to

William Yuen <wil...@dreamclass.com.hk> wrote in message
news:7up77q$t0c$1...@news.hk.linkage.net...

> I think the Java Servlet is the best option for me. But here in Hong

> On the other hand, do you know is there any ISP in other country will
> support Java Servlet ?

There are many. Particularly in the US and Canada. But it usually only comes
with the more expensive accounts and even then you often have to pay extra.
My host (http://www.webhosting.com) charges $25 per month extra for running
servlets.

I agree that a servlet would work best for you, or an executable written in
c or something.

Regards,

Jos van Uden
http://www.javalovers.com


William Yuen

unread,
Oct 23, 1999, 3:00:00 AM10/23/99
to
Thank you very much again Andrew.

Actually I am not an expert as you, so I don't really catch what you mean.
But I will print your message out and keep it in a good place until I start
to do the difficult part.
I know nothing about C and just started to learn Perl.

What I am going to do is to continue on what I got on hand, do a good
membership interface on my website and put some single player applet on it,
store the high scores and make them come back to break the records.

I will do multiplayer game, I am sure I will, because I want to learn how to
do it. Now it is just too hard for me. When I start to do it, I will come
back to you again :) Please help me in the future :)

So could we be friends ? If you have chance to come to Hong Kong, I will
show you the COOL places to get those really "low price" software, PC games,
console games, etc.... heehee... you know what I mean ?

Best Regards,

William Yuen


Andrew Gower <mran...@nospam.bitsmart.com> wrote in message

news:7upuc3$p24$1...@pegasus.csx.cam.ac.uk...


> >I think the Java Servlet is the best option for me. But here in Hong

> >On the other hand, do you know is there any ISP in other country will
> >support Java Servlet ?
>

William Yuen

unread,
Oct 23, 1999, 3:00:00 AM10/23/99
to
Oic, $25 for one servlet ? If I put all game room into one central program,
then may be the price is acceptable.

But the problem is, my game website will be hosted in Hong Kong (for Chinese
only), how is the speed of that hosting company to Asia countries ?

Jos van Uden <pari...@accessforall.nl> wrote in message
news:7uqdb6$jef$1...@news1.xs4all.nl...


>
> William Yuen <wil...@dreamclass.com.hk> wrote in message
> news:7up77q$t0c$1...@news.hk.linkage.net...

> > I think the Java Servlet is the best option for me. But here in Hong
>

> > On the other hand, do you know is there any ISP in other country will
> > support Java Servlet ?
>

Jos van Uden

unread,
Oct 24, 1999, 3:00:00 AM10/24/99
to

William Yuen <wil...@dreamclass.com.hk> wrote in message
news:7ur58m$ggp$1...@news.hk.linkage.net...

> Oic, $25 for one servlet ? If I put all game room into one central
program,
> then may be the price is acceptable.

Not one servlet of course. $25 buys you the permission to run any number of
servlets. Also you have to have at least a $50 per month account.

There may be better offers out there, I haven't checked.

> But the problem is, my game website will be hosted in Hong Kong (for
Chinese
> only), how is the speed of that hosting company to Asia countries ?

I don't know. I'm in Europe myself. But most of my visitors are from the US.
So Canada is not such a bad choice. I agree that it's better to have one
closer to you. There are sites that offer an overview of hosts. Maybe you
can find something interesting here:

http://www.findahost.com/hosts/default.cfm

Regards,

Jos


William Yuen

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to
I found that www.useractive.com they provide a even cheaper, only $5.95 for
servlet, by a $9.95 plan. Just for below $16 I can get both, include MySQL,
great !

But I still want to put my site in Hong Kong, so maybe I will put all the
HTML, class, images in the hosting company in Hong Kong. But I put the
servlet program running in UserActive, is it possible ?

I mean can the Java program loading from one host to communicate with the
Java servlet at other host?

Regards,
William

Jos van Uden <pari...@accessforall.nl> wrote in message
news:7uus4d$qnn$1...@news1.xs4all.nl...

William Yuen

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to

Jos van Uden

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to

William Yuen <wil...@dreamclass.com.hk> wrote in message
news:7v0fdu$7a5$1...@news.hk.linkage.net...

> I found that www.useractive.com they provide a even cheaper, only $5.95
for
> servlet, by a $9.95 plan. Just for below $16 I can get both, include
MySQL,
> great !

Interesting offer, but be careful... they don't actually mention servlets.
Make sure it's included before you take an account.

> But I still want to put my site in Hong Kong, so maybe I will put all the
> HTML, class, images in the hosting company in Hong Kong. But I put the
> servlet program running in UserActive, is it possible ?
>
> I mean can the Java program loading from one host to communicate with the
> Java servlet at other host?

Applets can only connect to the host that they have been loaded from. It
would be best to put everything on the same server. Loading the applet
shouldn't be a problem. How big is it?

Regards,

Jos


William Yuen

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to
Thanks you your information.

No, I have asked them, they said Java Servlet is included the DSP option.

About the program size, I don't know, because I don't actually started to
wirte the program. :)

If the Applet can only connect to the host that it is loaded from, then it
will be a trouble to me, because then I need to put everything on
useractive...... I think the loading time will be very slow for those people
connect from Hong Kong.... too bad... because I also need to store the
membership information in MySQL, use CGI to update it, etc. If everything
is on a long-distance host, then I afriad nobody will come to play on my
game center.

Any suggestions ?


Jos van Uden <pari...@accessforall.nl> wrote in message

news:7v10rb$ikc$1...@news1.xs4all.nl...

Jos van Uden

unread,
Oct 25, 1999, 3:00:00 AM10/25/99
to

William Yuen <hkja...@hotmail.com> wrote in message
news:7v1hv1$bq...@imsp212.netvigator.com...

> Thanks you your information.
>
> No, I have asked them, they said Java Servlet is included the DSP option.
>
> About the program size, I don't know, because I don't actually started to
> wirte the program. :)
>
> If the Applet can only connect to the host that it is loaded from, then it
> will be a trouble to me, because then I need to put everything on
> useractive...... I think the loading time will be very slow for those
people
> connect from Hong Kong.... too bad... because I also need to store the
> membership information in MySQL, use CGI to update it, etc. If everything
> is on a long-distance host, then I afriad nobody will come to play on my
> game center.

Have you tried it? If you connect to European or American game centers do
you get a slow response? I think distance is less important than network
congestion. If you connect from Hong Kong to the American west coast,
there's little congestion in between. I would expect that connection to be
fast. I don't have experience with it though.

Good luck.

Regards,

Jos


William Yuen

unread,
Oct 26, 1999, 3:00:00 AM10/26/99
to
I have tried to ping the local ISP and useractive, here is the result :

Local (HK) ISP : 150ms
UserActive : 425ms


Jos van Uden <pari...@accessforall.nl> wrote in message

news:7v1mjn$mr9$1...@news1.xs4all.nl...

0 new messages