Advice on writing my first network applet

M

Morten Nørgaard

Hi,

I've done a small bunch of desktop applications, and now I'm about to
take on a small networking applet. I'd like to write a board-game applet of
some kind, supporting up to 4 players. Alas I'm not up-to-date on network
programming, and I'd really appreciate it if some of you guys who are would
be so kind as to jot down some keywords of what I'll need to look into, and
stumble-blocks I'm bound to run into. The game should feature some action,
but it'll probably be limited to having game-pieces moving about on the
applet, as many as there are users, and simultaniously, of course. So, thank
you for those keywords, and maybe even - hopeful - one or two example and
tutorial-links.

Thank you,

Morten
 
T

Tim Jowers

Morten,

Here's an architecture that might work: Java applet that uses
Graphics to Paint. Will want to use double-buffering (off-sreen
rendering and then copy to screen) for smooth graphics. Applets are
architecturally client-to-server_fro_which_applet_came but to open up
access from/to any other network node then you'd have to sign the
applet. Sun has a good tutorial on how to sign an applet. For
starters, I believe you can just do it all on one machine with several
browser instances. (Not "new window" but new app I believe would be
right). Later, try on two computers and realize you need to sign the
applet.
Just get a simple applet that draws a string or image onto the
screen. Then you can program your game. You'll probably use a
home-grown protocol which is basically sending bytes over Sockets. Or
you can dive into RMI and that allows you to pass whole Java objects
without having to manually handle the bytes. A little more complex
though.

Best luck,
Tim

PS> you can do this all with a Swing app as well. An Applet versus a
Swing app is really just a method and different inheritance pretty
much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top