[Tutor] Advice; Pointers Needed

David Broadwell dbroadwell at mindspring.com
Thu Apr 1 01:53:04 EST 2004


I'm trying to get a handle on a pet project.

What I'm trying to build is a basic 'dice' server to send and receive dice
rolls with multiple internet clients.

The 'dice' in this case is just a rolling algorithm to simulate different
types of dice depending on what the 'game master' wants. Luckily the game
master IS the programmer that will be at the server, and until it goes the
only dice schema will be rock, paper, scissors OR d10 or d10. Also luckily
is the fact there is only one client (for now), and that is the machine that
the player (who is also the programmer) can get to via rotating his seat.
Also luckily is the fact that both machines in question while in differing
subnets (forcing internet communication) are one hub away from each other.

The server will need to be able to roll dice, request dice roll from client,
wait for die roll, evaluate success or failure, display result of roll, send
message success/fail message to client, handle a client login, handle a
client logout, forcibly log a client out.

The client will need to read a incoming request for a die roll, roll die of
the type requested, send the result to the server, wait for the response
from the server and tell the player a success or fail message, login to
server, logout from server.

For a first pass, (Hardcode server and client) simply having the server send
a client the succeeded or failed message will be a good starting success.

--

I'm guessing that I'll be needing threads in there somewhere. But as far as
the rest, where should I start?

--

We game online pretty good, but this is the stumbling point ... having them
roll dice under the eye of a web cam is a glorious waste of bandwidth.

--

Programmer's Mantra; Observe, Brainstorm, Prototype, Repeat ... Quickly!

David Broadwell




More information about the Tutor mailing list