Installing XNA 4 on Windows 8 / 8.1

Microsoft has long since abandoned XNA improvements, but that doesn’t mean you have to stop using the framework entirely. If you’re interested in installing the XNA framework on Windows 8 and 8.1, it can be a little tricky. Follow these steps.

Option 1


  1. Download and install the latest version of the Games for Windows – LIVE Redistributable from
  2. If you are installing the Windows Phone SDK 7.1, re-run setup and choose to repair it. This will re-run the previously failing XNA Game Studio installers and they should install correctly this time.
  3. If you are install a standalone XNA Game Studio product, re-run setup and it should install correctly this time.
  4. If you are planning to do Windows Phone development, you should also install the Windows Phone SDK 7.1.1 Update after installing the Windows Phone SDK 7.1. This update fixes an issue that prevents the emulator in the Windows Phone SDK 7.1 from working correctly on Windows 8.

If you are installing the Windows Phone SDK 7.1, you can use the log collection tool to gather your setup log files. This log collection tool will create a file named %temp%\

If you are installing XNA Game Studio, you can find log files at the following locations:

  • XNA Game Studio 4.0 Refresh – %temp%\XNA Game Studio 4.0 Setup\Logs
  • XNA Game Studio 4.0 – %temp%\XNA Game Studio 4.0 Setup\Logs
  • XNA Game Studio 3.1 – %temp%\XNA Game Studio 3.1 Setup\Logs
  • XNA Game Studio 3.0 – %temp%\XNA Game Studio 3.0 Setup\Logs
  • XNA Game Studio 2.0 – %ProgramFiles%\Microsoft XNA\XNA Game Studio\v2.0\Setup\Logs

Option 2

This method may not be entirely legal, so only try it at your own discretion.… Continue reading

Beta Testing Steam In-Home Streaming

Invite via Email

Valve has launched the initial phase of beta testing for their new Steam In-Home Streaming service. I have no clue how many people go into this first phase, but I was lucky enough to get invited. I was at work today and casually checked email from my phone. To my excitement, this popped up in my inbox.

InviteIf you got invited, then you will likely receive a similar email. It comes from the address “” if you’re curious. It doesn’t ask for any usernames, passwords, or any other Steam information, so don’t fall for any scams that people try to send you.

The email will have links to a Steam Support article with answers to some common questions, how to get setup, and how to get additional help. I highly suggest reading the support article and visiting the main streaming page.

The Gear

All my tests are going to be with mouse, keyboard, and touchpad (on the laptop). I don’t have a proper controller to test controller input.

Router: Linksys WRT54GL (10/100M ethernet / 54Mbps wireless)
Cables: CAT5e

Desktop (Host) Laptop (Client)
Model Number Custom Toshiba P755-S5215M
CPU Intel i5-2500K @ 3.3GHz Intel i3-2310M @ 2.1 GHz
GPU NVIDIA GTX 560 Ti Integrated Intel HD
Motherboard ASRock Z68 Extreme3 Gen3 Unknown
OS Windows 8.1 64-bit Xubuntu 13.04 64-bit
Resolution 1920×1080 1366×768

Getting Setup

Honestly, reading the support article linked above would probably suffice, but that’s so boring. Don’t you want to follow along with someone who is in the beta?… Continue reading

Resolution Independent 2D Rendering in SDL2

A little over a year ago, I wrote a post about how to render to a fixed, virtual resolution so that we can render independently of the actual window size resolution. That approach utilized the XNA framework to perform what we needed. Since Microsoft effectively killed XNA by pushing forward with DirectX / WinRT, myself and others have moved on to other libraries. In this post, I will show you how to do the same thing but with SDL2. Honestly, this approach is even easier (as long as you are using SDL2 that is!)

The concept of rendering to a virtually sized target is labeled as “Logical Size” in SDL2. Rendering a game to a logical size makes the scaling of that game to match different window sizes much easier. Imagine that we created our game under the assumption of 800×600 (an old school, 4:3 aspect ratio). On a user’s machine that has their system resolution set to 1920×1080, we have two choices: 1) show the game in a tiny window or 2) stretch the picture to fit the full screen. Both of these options are pretty terrible. In the first, the window will be too small to see anything useful (depending on the textures and fonts used in the game). In the second, the stretched picture will look awful because the aspect ratios do not even match. This is where SDL2’s logical rendering comes into play.

After establishing your renderer, all you really need to do is call the SDL_RenderSetLogicalSize function with the appropriate parameters.… Continue reading

Using SDL2-C# to Capture Text Input

A common feature of applications and video games is to allow the player to input text for various reasons. Maybe we want to allow the player to input their character’s name in an RPG, name a city in SimCity, or type a chat message to a friend in online. Using SDL2, we can take advantage of its built-in text processing system which abstracts much of the operating system event handles and character encoding mechanisms.

On consoles such as Xbox and Playstation, text input is rather simplistic and limited to visual keypads that you select via the controller. On a PC, we have the full range of widely varying keyboards from English and Spanish to Russian and Japanese. If we want our game or application to attract users on an international scale, it’s probably in your best interest to learn here and now how to use SDL2 to accomplish this goal.

At first glance, it probably seems simple to process text input. If the user presses the ‘A’ key on the keyboard, the OS will send an event that the keyboard was just pressed, the key was ‘A’, and no modifier keys were pressed (CAPS, SHIFT, CTRL, ALT, etc…). That’s it, right? Unfortunately, there are a ton of languages on this planet, and some of them have thousands of characters in them. People who type in those languages most certainly do not have thousand-letter keyboards or entire walls of their houses dedicated as a giant keyboard. This basically means that some characters will require multiple key presses just to process.… Continue reading

2D Tile Maps – Tile Picking

Several months ago, I talked about the distinction between world space and screen space. As a recap, these are fundamental concepts that separate our game or simulation state from our drawn or rendered state. What gets drawn to the screen is not necessarily how things are laid out in the game’s actual (world) state. Check out the previous articles for more information.

The concept of tile picking involves a user hovering their mouse or some other input device over a tile in the game map. Usually the user is doing this in order to interact with the tile such as moving a unit to a location, placing an item on the tile, or inspecting the metadata of the tile. Fortunately for the developer, the process of picking is independent of the projection other than some simple math to do a conversion of coordinates.

Imagine that you are playing SimCity 2000, and you want to create a stretch of road from one location to another. The process involves the user hovering the starting tile, clicking the mouse, dragging the road to the end tile, and releasing the mouse. Tiles were picked out of the game map based on the mouse’s coordinates during game updates. Which space do we pick the tile from? Do we have to calculate if the mouse is contained within the projected tile or within the game’s world space coordinates?


If the projection used in the game is orthogonal (think NES/SNES Zelda games), then the tile picking really is just a matter of answering the question, “Which tile contains the current mouse coordinate?” Answering the question is simple:

2D Tile Maps – World and Screen Spaces

If you are not familiar with tile maps, please see the previous article in this series before reading this article.


A space is simply some collection of points, vectors, shapes, and other objects that we use to store the state of our game or simulation. There are various kinds of spaces that can be employed during game development, but the two that I will focus on for this article are the concepts of world spaces and screen spaces. It is important to know the distinction and differences between these two spaces because it will make your game development journey much clearer and easier. Personally, it took me awhile before the concept of separating the spaces really “clicked” for me.

World Space

The most commonly understood space is the world space of the game. This is the space that contains the positions of all entities in the game. For example, if we have a 5 x 5 tile map where each tile is 16 x 16, worldspacewe can represent that map (as discovered in the previous article) as a two dimensional array where [0, 0] is the first tile and [5, 5] is the last tile. Where these tiles are drawn on screen is of no importance when you generate the tile indices in the representative array. The underlying world of your game is represented by this array. The entities live their lives in this boring, mundane, grid-like existence.

All the game interactions and logic take place within this world space because of how extremely simple and efficient it is to perform calculations if we assume our game is as simple as an evenly laid out grid.… Continue reading

2D Tile Maps – An Introduction

Tiles and You!

So maybe you have or have not heard about tiles within the context of video games. For those of you who have, great, tread onwards into the more advanced areas of the article. But to those of you who have not, take some time to let the information below soak in. I strongly suggest that you spend time implementing and testing some solutions of your own in throwaway projects just to see the results in real time and for yourself. Many people are hands on learners and doing a lot of the experimentation yourself goes a long way to understanding the concepts.

I plan to make a few articles about various topics in tiles, tile maps, rendering, and interacting. Part 1 will focus on the concepts behind two popular formats of tile maps and rendering techniques. Part 2 will delve more deeply into rendering isometric tile maps with an explanation of the differences between world space and screen space. Finally, in Part 3, I will discuss topics such as isometric tile picking and moving entities within an isometric tile space.

Before all that though, let’s begin with the basics, shall we?

Cartesian Tile Maps

Maps are often stored and displayed in equally sized tiles to make life easier on the renderer and the artists. It is usually easier to begin understanding a tile map in an oblique projection, which is one of the simplest (but very effective) forms of projecting your tiles. Many popular games from the 80s, 90s, and even 00s take advantage of this projection due to its relatively simple mathematics.… Continue reading

How to load a map from Tiled Map Editor and render it with SDL2

I recently created a library named SharpTiles that is heavily based on Nick Gravelyn’s TiledLib. Both libraries will allow developers to load maps from Tiled Map Editor. However, TiledLib is based around XNA while SharpTiles is based around SharpDL (an XNA-like game framework for SDL2). I will discuss more about SharpDL in another post, but you can refer to the simple code in this post to learn how to render a map with a small subset of the library.

Load a Map

  • Window is a SharpDL object that represents a SDL_Window
  • Renderer is a SharpDL object that represents a SDL_Renderer
  • TiledMap is the main object that you will use to load a map file

Draw a Map

You can draw a map by looping through all TileLayers (layers which containd textured tiles) and all Tiles within the layers.… Continue reading

Setting Up SDL2 with Visual Studio 2012 and 2013

I have confirmed that everything below works for Visual Studio 2013.
Links updated to the latest release (2.0.3).

The Simple DirectMedia Library (SDL) version 2 has been released after a long time in development. It seems that the author has more time on his hands and more corporate backing from his new position at Valve Software. I’ve heard that they use SDL for various small time projects that don’t require heavy rendering. Even so, SDL does a formidable job at making things easy.

I wrote this guide under the following setup, but I’m sure that it can be applied to other version of Windows (and maybe even Visual Studio).

Anyway, try your setup and let me know how it goes. Follow these steps to get all setup and ready to code:

  1. Download the development libraries
  2. Download the 32-bit binary or the 64-bit binary
  3. Extract both zips to a convenient location
  4. Open Visual Studio and create an empty C++ project
  5. Right click the created project in the Solution Explorer, go to Properties
  6. Click VC++ Directories under Configuration Properties
  7. In the “Include Directorires” line, add the include directory from the extracted development library
  8. In the “Library Directories” line, add the libx86 directory from the extracted development library
  9. Click Linker –> Input under Configuration Properties
  10. In the “Additional Dependencies” line, add “SDL2.lib” and “SDL2main.lib” strings
  11. Click Linker –> System under Configuration Properties
  12. In the “SubSystem” line, change the selection to WINDOWS(/SUBSYSTEM: WINDOWS)
  13. Finally, copy the SDL2.dll file from the extracted 32-bit binary folder to your project’s output directory alongside the executable

OK, the ugly project setup is finished.… Continue reading

Steam Community Viewer – Update 1

I released the first update to the Steam Community Viewer Windows 8 application.

Search for it in the Windows 8 Store or view it here.

Changes include:
– Pressing “Enter” will now submit searches on the main page
– Added link to Steam Store for specific deals in the Deals section
– Added ability to subscribe to Windows 8 Toast Notifications when friends come online or start playing a game (Settings Flyout -> Notifications)
– Added ability to subscribe to Windows 8 Live Tile Updates for the latest 5 deals based on (Settings Flyout -> Notifications, US only right now)
– Various other bug fixes… Continue reading