3D Animation Workshop: Lesson 78: Web 3D Gaming | WebReference

3D Animation Workshop: Lesson 78: Web 3D Gaming


Lesson 78 - Web 3D Gaming- Part 1

In the past few lessons, we've been previewing Shout3D 1.0, a software package that allows developers to embed a realtime, interactive 3D rendering engine directly into a Web page. Because it runs as a Java applet, Shout requires no plug-ins on the user's (client) computer. I'm happy to finally be able to announce the release date of this groundbreaking new product. The official word is that Shout3D 1.0 will be available on November 10. I'll have further information in my next column, but check out www.shout3d.com after November 10 for purchasing instructions.

I've said it before and, at the risk of sounding dogmatic, I'll say it again. The success of 3D graphics on the Web depends on powerful user interactivity. We have to learn to think in terms of 3D applications, rather than simply of 3D scenes and animation, if high-end computer graphics is to find a firm place on the Internet. That's the main reason why I'm so interested in Shout3D right now. Shout3D addresses the fundamental issues facing the successful commercial utilization of 3D on the Web by merging Java technology with existing tools for producing 3D models and scenes. And Java brings unlimited power to the 3D Web developer.

I've spent a great deal of time poring over the Java source code for the game that is included as a demo piece in the Shout3D 1.0 beta package. I need hardly stress the significance of being able to offer true 3D games over the Internet. But the most impressive aspect of this particular game is the use of real-world physics. In this lesson, I'd like to introduce you to the structure of this game in a general way so that you can get a good idea of what goes into producing this kind of highly-commercial content in Shout3D.

First, let's look over the finished game.

To play this game, the user presses down the left mouse button, anywhere in the applet window, to retract the character's arm. Releasing the mouse button causes the throwing arm to accelerate forward, releasing the plunger (called a "plunger" in the program) toward the target. Note the arm can be pulled back only so far. Note also that the target is stationary. If you pull the arm all the way back before you release, the plunger will always hit the stationary target, causing the girl to be dunked. The target will then begin to swing back and forth, making it much harder to hit in subsequent tries.

You can cause the target to start or stop swinging by pressing the "t" key on your keyboard. You can also force an automatic win by throwing with the right mouse button, instead of the left one. The girl will then dunk regardless of whether the target is hit. After every throw, pressing the mouse button restores the plunger to the character's hand, and begins another throw.

Take some time to play the game a bit, and pay particular attention to the action of the plunger. As it leaves the character's hand, it is both thrown forward and caused to rotate in a realistic way. If it hits the floor or the back wall, it bounces off and loses energy on the rebound. Note also how much a greater retraction of the arm affects the speed of the plunger on its trajectory. The arm is accelerating as it flies forward, imparting a greater velocity to the plunger the longer it is held in the hand.

To Continue to Parts 2 and 3, Use Arrow Buttons

Created: Oct. 26, 1999
Revised: Oct. 26, 1999

URL: https://webreference.com/3d/lesson78/