Anatomy of a Silverlight Game: Avoid Common Mistakes When Building Online Games

Last week I created a document that incorporates my experiences developing the Shock Silverlight online game so far.

The document discusses the basics of online games in Silverlight and has a lot of practical examples (code) and a working project that you can use to build your own game.

Don’t make the mistakes I did! Happy coding!


Open Document: Anatomy of a Silverlight Game.docx


Download Source Code Project

Play Sample Game


Here are the abstract and contents of the doc: 


Typical online games have a start screen, levels, storyline, transitions, high scores, chat, and other features that can take significant amount of time to develop.

There are challenges when building online games, such as full screen support and scaling; speed optimization; animations; real-time calculations.

Learn how to develop compelling Silverlight games faster, by using a base framework for the common game elements outlined above.




About the Author

About this Document



Target Audience

Getting Started

1.      Introduction: Why Care About the “Details”?

2.      Components of an Online Game

3.      Screen Layout

Visual Layers that Make Up Your Game

Game Interface Layer

In-game Controls Layer

Sounds Layer

Start Screen Layer

Main Screen Popup Controls Layer

4.      Silverlight Game Internals

The Game Loop

Some Classes That You’ll Likely Use in Every Game

The Game Class

Defaults Class

Globals Class

Enumeration Classes

Sounds Class

Other Classes

Keyboard and Mouse

Full Screen Support

Returning from Full Screen to Embedded Mode

Aspect Ratio

More Info


Sound and Music

5.      Networking


Chat and Multiplayer

Network Speed Optimizations

6.      Host Integration

7.      Cheat Protection

8.      Tips and Tricks

9.      Summary


Happy Reading!

Anatomy of a Silverlight Game.docx

Comments (15)

  1. In this issue: Ken Cox, Shawn Oster, Andy Beaulieu, Dean Chalk, Matthias Shapiro, Nikola, Arturo Toledo

  2. Mads Laumann says:

    This is awasome reading! Keep up the good work, I really enjoyed reading this document.

    You are on my RSS feed list new 😀

  3. says:

    Avoid common mistakes when building silverlight online games

  4. There is a fantastic tutorial out Anatomy of a Silverlight Game: Avoid Common Mistakes When Building

  5. Nikola Mihaylov, a Software Design Engineer in Test at Microsoft working on the WPF/Silverlight tools

  6. There is a fantastic tutorial out Anatomy of a Silverlight Game: Avoid Common Mistakes When Building

  7. You’ve been kicked (a good thing) – Trackback from

  8. Joey says:

    Just realized I had office 2002 on my computer. Any chance on getting a pdf of this? Looking forward to reading what you’ve done 🙂

  9. nikola says:

    Hi Joey, please follow this link and select "Download":

    Sorry for the late response, I just realized the notifications on my blog were no longer sent to my email.

  10. Jom says:

    How do i read a docx file?

    Can you have an option of a pdf, html or old doc file?

  11. Jon says:

    Sorry, just read the comment above with the pdf link.

  12. nikola says:

    np, hope you’ll like it!

    I’m making a new game and will be publishing some new stuff soon (about making stories in the game and sequencing) – just as blog posts at first. It is very interesting!

  13. Gene says:

    Hello I just wanted to let you know about MIRIA Input Gateway that enables Silverlight games to be controlled by games controllers such as Wii Remote.

    Best Regards,


  14. nikola says:

    Thanks Gene! Could you tell me more about (in e-mail?) I’d like to blog about it, but I have few questions – thanks!