Java3D Network Tennis Game Project

Hey all!

Last year, I wrote a tennis game in Java3D for my final-year college project; it can be played by two players either on a single machine or across a network. Although I was delighted with how well it turned out, there were (naturally) certain features which I wanted to incorporate or improve but was unable to, due to time constraints and the submission deadline. With this in mind, I decided to publish the game under the GPL, and establish a website and forum where people could download the source, try to enhance it or add extra features, give suggestions on future developments, etc. That site is now online at:

http://www.redbrick.dcu.ie/~acathla/index.html

I’ve already received a few emails from people who stumbled across the site and were interested in what they saw. Rather than simply rewriting the code myself in isolation, I’m hoping that this can become a project involving input from as many different sources as possible; not only will it be a far more interesting experience, but it will ultimately result in a better final version of the game.

Hope to hear from some of you on the forum soon!

Interesting. That’s Java3D immediate mode, right?

Just 1 source file with the complete game…

What a about a webstart version? And some help about the controls somewhere?

Herkules - yep, all rendering in the game is done in immediate mode. I had initially intended to use a combination of retained and immediate modes, but I found this approach to be far more flexible.

The controls, instructions on how to run a client/server version, etc can all be found in the User Manual - there’s a link on the site to download it together with the technical manual.

http://www.redbrick.dcu.ie/~acathla/index.html
http://www.redbrick.dcu.ie/~acathla/techuser.zip

Just wanted to note that it would be better to have the game startable and the manual readable immediately w/o d’loading a zip, extracting it …

A *.bat starting the game would be helpful as well (as a minimum)!

Now you need an experienced Java developer who is able to guess how the main class can be found and started…

Ups, the framerate slightly influences the speed of the game :slight_smile:

Herkules - yes, it does :wink:

I had initially made the game speed independent of the framerate by calculating the time since the last update and moving the ball a variable distance in proportion to this - so, for instance, on a computer running at twice a predetermined “standard” speed, the ball would only move half the “standard” distance on each update. On a computer running at one-third the standard speed, the ball would move three times the standard distance. This was extremely effective in equalising the speed at which the game ran on computers of differing power. Unfortunately, this approach was flawed in one important regard; it introduced tiny deviations in the path of the ball on different computers. These were imperceptible to the human eye, but because the physics engine runs independently on each machine, shots were occasionally judged “in” on one computer and “out” on the other, causing the gamestates to go out of sync. As a result, I abandoned the approach; now, each user can set a target update rate which the game will attempt to reach but will never exceeed. At the start of network play, each copy of the game tells the other its proposed update rate, and the slower of the two is adopted by both; this means that a player on a slower computer can dictate a speed that he knows his computer is capable of keeping up with. Of course, he can specify a faster speed and the game will still run OK - he’ll just have a very choppy framerate :wink:

Actually, this is dealt with in greater detail in the Technical Manual, section 3.4.

As for the batch file, etc - these features will be added soon!

Wow, that is seriously impressive looking. Especially for just one dude! :o