views:

41

answers:

1

I want to play that Qbasic Gorillas game with someone that lives in Florida.

Here's the flash version online Gorillas

This link is to someone's post about the remake he programmed - there is a link to the game above in there and also his source code for it playerio.com


If possible, how can I modify the code so that I can play against them over the innernet?

Should the game be public, private, or some combination of both?

It would also be cool if you could replay tosses or entire rounds with their respective angle/velocity inputs.

A: 

Take a look at sockets. Sockets are how you can connect two computers over the internet. In most implementations of sockets, you have a server socket and a client socket. The server socket listens for connections, and the client socket tries to connect to a server socket. In your case with just you and your friend, it doesn't matter much which of you is the server or client, but you will have to program for both. You also have to choose a protocol to use. The two protocols for online gaming are TCP and UDP. TCP is the most common and it is a reliable "guaranteed" connection (TCP would send data that is important). UDP is a connectionless protocol where the client just sends data with no guarantee that the data will actually get there. UDP is mostly used for very frequent updates in online games (UDP would most likely be used to send positional data in a first person shooter for example). So with your protocol in mind, I would start by adding a simple chat feature to the game. That way, you can see something working and start to understand what is happening better.

Samuel