O'Reilly logo

Game Development with SlimDX by Michael Fontanini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Rendering 2D Graphics

One of the biggest aspects in a video game is the graphics. It's why we call them video games after all! So how do we create images on the screen? As we did with user input in the previous chapter, we have a couple of options here. They are Direct2D and Direct3D . We will focus on Direct2D in this chapter and save Direct3D for a later chapter.

In this chapter we will cover the following topics:

  • Creating a Direct2D game window class
  • Drawing a rectangle on the screen
  • Creating a 2D tile-based game world and entities

Creating a Direct2D game window class

We are finally ready to put some graphics on the screen! The first step for us is to create a new game window class that will use Direct2D. This new game window class will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required