Table Of Content3D Game Development with
Microsoft Silverlight 3
Beginner's Guide
A practical guide to creating real-time responsive online
3D games in Silverlight 3 using C#, XBAP WPF, XAML, Balder,
and Farseer Physics Engine
Gastón C. Hillar
BIRMINGHAM - MUMBAI
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
3D Game Development with Microsoft Silverlight 3
Beginner's Guide
Copyright © 2009 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2009
Production Reference: 1180909
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847198-92-1
www.packtpub.com
Cover Image by Gastón Hillar and Adline Swetha Jesuthas
Cover image for illustrative purposes only.
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
Credits
Author Editorial Team Leader
Gastón C. Hillar Abhijeet Deobhakta
Reviewers Project Team Leader
Tarkan Karadayi Priya Mukherji
Richard Griffin
Project Coordinator
Acquisition Editor
Zainab Bagasrawala
James Lumsden
Proofreader
Development Editor
Lesley Harrison
Darshana D. Shinde
Graphics
Technical Editor
Nilesh R. Mohite
Arani Roy
Production Coordinators
Copy Editor
Aparna Bhagat
Sneha Kulkarni
Shantanu Zagade
Indexer
Cover Work
Hemangini Bari
Aparna Bhagat
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
About the Author
Gastón C. Hillar has been working with computers since he was eight. He began
programming with the legendary Texas TI-99/4A and Commodore 64 home computers
in the early 80's.
He has a Bachelor's degree in Computer Science in which he graduated with honors, and
he also has an MBA (Master in Business Administration) in which graduated with an
outstanding thesis. He has worked as a developer, an architect, and project manager for
many companies in Buenos Aires, Argentina. Now, he is an independent IT consultant and a
freelance author always looking for new adventures around the world. He also works with
electronics (he is an electronics technician). He is always researching new technologies and
writing about them. He owns an IT and electronics laboratory with many servers, monitors,
and measuring instruments.
He has written another book for Packt, "C# 2008 and 2005 Threaded Programming:
Beginner's Guide".
He contributes to Dr. Dobb’s Go Parallel programming portal http://www.ddj.com/go-
parallel/ and he is a guest blogger at Intel Software Network http://software.
intel.com
He is the author of more than 40 books in Spanish about computer science, modern
hardware, programming, systems development, software architecture, business applications,
balanced scorecard applications, IT project management, the Internet, and electronics.
He usually writes articles for the Spanish magazines "Mundo Linux", "Solo Programadores"
and "Resistor".
He lives with his wife, Vanesa, and his son, Kevin. When not tinkering with computers, he
enjoys developing and playing with wireless virtual reality devices and electronics toys with
his father, his son, and his nephew Nico.
You can reach him at: gastonhillar@hotmail.com
You can follow him on Twitter at: http://twitter.com/gastonhillar
Gastón's blog is at: http://csharpmulticore.blogspot.com
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
Acknowledgement
While writing this book, I was fortunate enough to work with an excellent team at Packt
Publishing Ltd, whose contributions vastly improved the presentation of this book. James
Lumsden helped me to transform the idea in the final book and to take my first steps
working with a new Beginner's Guide. Zainab Bagasrawala made everything easier with both
her incredible time management and patience. Darshana Shinde helped me realize my vision
for this book and provided many sensible suggestions regarding the text, the format and the
flow. The reader will notice her great work. Arani Roy made the sentences, the paragraphs,
and the code easier to read and to understand. He has added great value to the final drafts.
Special thanks go to Einar Ingebrigtsen (http://www.ingebrigtsen.info), Balder's
lead developer. Einar's work inspired this book. He made it possible to have a game engine
for Silverlight 3. This book was possible because Einar helped me with each new feature
added to Balder. His outstanding knowledge on game development made it possible to work
with an excellent engine. I also have to thank Petri Wilhelmsen, another Balder's developer
who also helped to improve the engine. I would like to thank my technical reviewers and
proofreaders, for their thorough reviews and insightful comments. I was able to incorporate
some of the knowledge and wisdom they have gained in their many years in the software
development industry. The examples, the pictures and the code include the great feedback
provided by Tarkan Karadayi. Tarkan helped me a lot to include better and shorter code to
simplify the learning process. I would like to thank Mark Dawson, Kit3D's developer. Mark's
work also inspired the development of many simple 3D applications using previous Silverlight
versions and his simple yet powerful engine. I wish to acknowledge Bill Reiss, as he worked
to show the world that Silverlight games were possible. He was another great source of
inspiration for my work on this book. I would like to thank Doug Holland, as his blog posts at
Intel Software Network always helped me to stay tuned with tips related to many products
used in this book.
I must acknowledge David Barnes, Beginner's Guide Series Editor at Packt. His help in my
previous book and his wisdom is also part of this new one. I must also thank Shilpa Dube,
Rakesh Shejwal and Rajashree Hamine. They helped me in my previous book written for
Packt and this new one was much easier bearing in mind their excellent tips.
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
I wish to acknowledge Hector A. Algarra, who always helped me to improve my writing.
Special thanks go to my wife, Vanesa S. Olsen, my son Kevin, my nephew, Nicolas, my father,
Jose Carlos, who acted as a great sounding board and participated in many hours of technical
discussions, my sister, Silvina, who helped me when my grammar was confusing and my
mother Susana. They were always supporting me during the production of this book.
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
About the Reviewer
Tarkan Karadayi has been writing code since age 14. He has a Masters in Computer
Science and is currently working as a Lead Developer.
I would like to thank my wife Anna, my parents and my three sons Taran,
Kyle, and Ryan for their love and support.
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
I would like to dedicate this book to my son Kevin and my wife Vanesa
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375
This material is copyright and is licensed for the sole use by Vadim Kudria on 4th October 2009
6352 108th St, , Forest Hills, , 11375