spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / 3d / lesson118

Lesson 118 - WildTangent for Online Games - Part 3

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management

I was highly impressed with the JavaScript Game Tutorial provided in the SDK. This is an outstanding opportunity to learn not only the basics of the WildTangent API, but also principles of interactive 3D games programming generally. Anyone with the slightest interest in this subject should soak up everything there is to learn here.

The game is a simple first-person shooter scenario in which the camera is attached to a gun. The player surveys a flat grassy field with walls of mountains on all sides. Rotating alien ships descend from the sky and the player must shoot them all before any touch down.

The initialization process involves creating and texturing the simplest geometry and putting it to the scene. The more sophisticated geometry of the gun and alien ship (which is instanced multiple times) is imported. The gun and the camera are made children of the same group (transform) so that they move and rotate as a single unit.

Once setup is complete, the application responds to mouse and keyboard input. Dragging the mouse rotates the camera-gun group in both the pitch and heading, and uses a clever mechanism to assure that the cursor never passes off the edge of the screen. Three keys are used to move the camera-gun unit forward and backwards, and to fire spheres as bullets. In each of these cases, the keystrokes serve only as triggers because the actual object movement is handled between render cycles. This allows the proper determination of the distance moved, based on the amount of time that has passed since the previous frame was rendered.

The bullets move in the direction in which the camera-gun is pointed. A collision test is performed for each bullet on each render cycle to determine whether it has encountered an alien ship. If it has, the ship is made invisible and an explosion is triggered in the form of a textured ball with animated scale and opacity.

Here's a screen shot from the middle of the action. Note the grey bullet fired from the gun.

I can well imagine the excitement of someone who has never created an interactive 3D application finishing this tutorial and feeling transformed by the awareness of what it means to create a true game with a well-designed, professional API. At 16 MB, the WildTangent SDK is a big download for those without a broadband connection, but it's worth it. Those who are already familiar with powerful high-level 3D API's will definitely want to assess the WildTangent approach. (Indeed, a specific comparison between this tutorial and the game tutorial in my Shout3D book is very instructive.) Those who are new to the art of interactive 3D design may find themselves with a whole new passion.

To Return to Parts 1 and 2, Use Arrow Buttons

Previous Lesson / Table of Contents

Comments are welcome

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Symantec Whitepaper: Converging System and Data Protection for Complete Disaster Recovery
Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
  Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Symantec Whitepaper: Comprehensive Backup and Recovery of VMware Virtual Infrastructure
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Review: Lenovo ThinkPad SL300 · OCZ PC3-10666 Gold 2x1GB Review · Apple Recommends Antivirus for Macs

and brought to you by webreference.com

Created: May 8, 2001
Revised: May 8, 2001

URL: http://webreference.com/3d/lesson118/3.html