Free Sample
+ Collection

3D Game Development with Microsoft Silverlight 3: Beginner's Guide

Beginner's Guide
Gastón C. Hillar

A practical guide to creating real-time responsive online 3D games in Silverlight 3 using C#, XBAP WPF, XAML, Balder, and Farseer Physics Engine
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847198921
Paperback452 pages

About This Book

  • Develop online interactive 3D games and scenes in Microsoft Silverlight 3 and XBAP WPF
  • Integrate Balder 3D engine 1.0, Farseer Physics Engine 2.1, and advanced object-oriented techniques to simplify the game development process
  • Enhance development with animated 3D characters, sounds, music, physics, stages, gauges, and backgrounds
  • Packed with inspiring, realistic examples offering impressive graphics, strong performance, and a rich interactive experience

Who This Book Is For

This book is designed primarily for C# developers with basic knowledge of the Visual Studio IDE who want to develop online 3D games using Silverlight or create interactive 3D scenes for a web site with animated models. No prior experience in 3D programming, 3D animation, or Silverlight is required.

The book is also aimed at 3D developers who want to improve their online content, offering innovative 3D models in action.

Table of Contents

Chapter 1: Lights, Camera, and Action!
UFOs in the sky!: Invaders
Time for action—preparing the development environment
Time for action—recognizing digital art assets
Time for action—creating the raster digital content
Time for action—installing tools to manipulate scalable digital content
Time for action—creating the scalable digital content in XAML
Time for action—testing the scalable digital content using XamlPad
Preparing a gaming framework
Time for action—creating Silverlight applications
Time for action—building and running Silverlight applications
Time for action—creating XBAP WPF applications
Time for action—building and running the XBAP WPF applications
Chapter 2: Working with 2D Characters
Creating an accelerated graphics viewport
Time for action—enabling hardware acceleration
Time for action—transforming media using the GPU
Time for action—shaking many illustrations at the same time
Time for action—detecting GPU-acceleration problems
Creating encapsulated object-oriented characters
Time for action—creating User Control classes to hold images
Time for action—displaying images and sprites
Chapter 3: Combining Sprites with Backgrounds
The first remake assignment
Time for action—creating sprites based on XAML vector-based graphics
Time for action—creating a specialized sprite management class
Time for action—creating a superclass for some characters
Time for action—creating the subclasses for the characters
Time for action—creating methods for the game loop
Time for action—writing the game loop
Time for action—detecting collisions between 2D characters
Chapter 4: Working with 3D Characters
The second remake assignment
Time for action—exporting a 3D model without considering textures
Time for action—from DCC tools to WPF
Time for action—displaying a 3D model in a 2D screen with WPF
Time for action—using other XAML exporter for DCC tools
Time for action—adding 3D elements and interacting with them using Expression Blend
Silverlight and the 3D world
Time for action—exporting a 3D model to ASE
Time for action—installing Balder 3D engine
Time for action—from DCC tools to Silverlight
Chapter 5: Controlling the Cameras: Giving Life to Lights and Actions
Understanding 3D cameras
Time for action—when seeing is believing
Time for action—performing transformations
Time for action—zooming in and out
Time for action—understanding perspective and orthographic cameras
Silverlight and the cameras
Time for action—controlling cameras on the fly
Chapter 6: Controlling Input Devices to Provide Great Feedback
Giving life to the game!
Time for action—creating a keyboard manager class
Time for action—programming the input control in the game loop
Time for action—mapping a gamepad to the keyboard
Time for action—using the gamepad
Time for action—creating a mouse manager class
Time for action—using the mouse manager in the game loop
Time for action—using the gamepad as a mouse
Time for action—rotating cameras using input devices
Bridging with DirectInput capabilities
Time for action—installing the necessary SDKs
Time for action—understanding sticks and buttons
Time for action—testing the input devices with a DirectInput wrapper
Time for action—adapting a joystick manager class
Time for action—using the steering wheel in the game loop
Chapter 7: Using Effects and Textures to Amaze
Dressing characters using textures
Time for action—adding textures in DCC tools
Time for action—exporting 3D models from DCC tools to Silverlight
Time for action—enveloping 3D models
Time for action—replacing textures
Displaying lights, shadows, materials, and textures
Time for action—working with lights and understanding shadows
Chapter 8: Animating 3D Characters
Invaders 3D
Time for action—adding a UFO
Time for action—creating a new game superclass to generalize time management capabilities
Time for action—specializing a game superclass
Time for action—creating a subclass for a 3D character
Time for action—adding an Actor to the game
Time for action—rotating 3D characters
Time for action—scaling 3D characters
Using bones and skeletons
Time for action—animating models with skeletons and bones
Time for action—adding an Actor with skeletons and bones to the game
Chapter 9: Adding Realistic Motions Using a Physics Engine
Using physical principles in games to beat invaders
Time for action—installing Farseer Physics Engine
Time for action—adding parallel physics bodies and geometries to 3D characters
Time for action—working with forces, impulses, acceleration and speed
Time for action—working with torques and rotations
Chapter 10: Applying Artificial Intelligence
Detecting collisions between 3D characters
Time for action—adding a second UFO
Time for action—detecting collisions between 3D characters
Using artificial intelligence in games to control 3D characters
Time for action—using chasing algorithms
Time for action—using evasion algorithms
Chapter 11: Applying Special Effects
Working with 3D characters in the background
Time for action—adding a transition to start the game
Time for action—creating a low polygon count meteor model
Time for action—from 3D Studio Max to Silverlight
Time for action—creating a subclass for a 3D meteor
Time for action—creating and controlling a meteor rain
Time for action—simulating fluids with movement
Time for action—creating a subclass for a complex asteroid belt
Time for action—adding an asteroid belt background to the game
Chapter 12: Controlling Statistics and Scoring
Showing gauges and scorecards
Time for action—using special fonts
Time for action—creating a score gauge showing text
Time for action—showing a score gauge
Time for action—creating a bonus gauge showing text
Time for action—creating a fuel gauge
Time for action—creating a remaining lives gauge
Time for action—showing and updating multiple gauges
Chapter 13: Adding Environments and Scenarios
Working with levels and stages
Time for action—installing Windows Presentation Foundation Pixel Shader Effects Library
Time for action—adding screens to organize the game
Time for action—applying transition effects
Time for action—changing the transition effect
Time for action—using skill levels
Time for action—changing and improving the environments according to the skill level
Time for action—saving configurations
Chapter 14: Adding Sound, Music, and Video
Hear the UFOs coming
Time for action—installing tools to manipulate videos
Time for action—preparing a video to use it in Silverlight
Time for action—reproducing videos
Time for action—applying projections
Time for action—animating projections
Time for action—solving navigation problems
Time for action—reproducing music
Time for action—preparing audio files to use them in Silverlight
Time for action—creating a class to handle audio concurrency
Time for action—generating sounds associated to game events

What You Will Learn

  • Display and control 3D models in a 3D world
  • Set up and control cameras to display parts of an animated 3D world
  • Use an object-oriented design to define and specialize 3D characters
  • Create amazing effects by controlling cameras, lights, and characters using gaming input devices
  • Animate simple and complex 3D characters
  • Display, move, and rotate 3D models in a 3D world using different effects, textures, transformations, and artificial intelligence (AI)
  • Create realistic behaviors using physics simulations
  • Envelope the models using textures, materials, and lights
  • Add environments, backgrounds, scenarios, stages, skill levels, statistics, and scoring
  • Reproduce sounds and background music
  • Load and control 3D models developed in popular 3D modeling tools like 3D Studio Max, Blender, Google Sketch and AutoCAD

In Detail

Microsoft Silverlight is a programmable web browser plug-in that enables the animation, vector graphics, and audio-video playback features that characterize Rich Internet Applications. Silverlight is a great (and growing) RIA platform and games are the next level to exploit in it. But it doesn't offer 3D capabilities out of the box and integrating a 3D engine can involve lot of complex mathematics and matrix algebra. This book will help C# developers to get their fingers on the pulse of 3D in Silverlight.

This book uses Balder, an open source 3D engine offering 3D capabilities for Silverlight 3. It leaves out boring matrix algebra and complex 3D mathematics. By the end of the book you will have explored the entire engine, and will be able to design and program your own 3D games with ease!

The book begins by introducing you to the fundamental concepts of 2D games and then drives you into the 3D world, using easy-to-follow, step-by-step examples. The book employs amazing graphics and impressive performance, and increasingly adds more features to a 3D game giving you a rich interactive experience.

By following the practical examples in this book, you will learn the important concepts, from the creation of the initial models, up to the addition of physics and artificial intelligence.

The book helps you to provide realistic behaviors for 3D characters by enveloping models with different textures, using lights to create effects, animating multiple 3D characters using a physics engine (Farseer Physics Engine), and simulating real-life physics. Videos, music, and sounds associated with specific events offer the final touches to the 3D game development learning experience.


Read More