Introducing the Steam Community Viewer

In my free time, I’ve been developing a Windows 8 app to view Steam-related information (news, deals, community profiles). I just got notification that my new app was approved and listed on the Windows 8 store.

You can search for it directly in the Windows Store or see it online.

A brief description of the app is below:

The Steam Community Viewer allows users to search for Steam Community profiles to view profile details, game lists, game statistics, achievements, friend lists, group lists, and more. All data is obtained through public and Valve supplied methods. This application is not associated with Valve Software.

This is just a first release, but I’m hoping to add a lot more functionality as I continue to develop it.

Make sure to use the support email address listed in the store if you need any assistance. Additionally, you can tweet me @babelshift.… Read more

Steam Community Viewer Privacy Policy

The Steam Community Viewer allows users to search for Steam Community profiles to view profile details, game lists, game statistics, achievements, friend lists, group lists, and more. All data is obtained through public and Valve supplied methods. This application is not associated with Valve Software.

All data is made available through Valve provided interfaces. I do not own any of the data provided through this application. Except for your Steam ID, this application does not store, collect, or share any data that you enter or retrieve through its use. Data is not tampered with between retrieval and display except for formatting purposes. Your Steam ID is only stored if you enable “Friend Notifications” in the “Notifications” tab of the “Settings Flyout”. When you disable “Friend Notifications”, your Steam ID is immediately removed from storage.

This application does not provide any means of managing the your profile data because your profile data is not owned by the developers of this application. The only way to modify your profile data presented in this application is to modify your profile through the official Steam application or website.… Read more

Porting a Game from XNA 4.0 to MonoGame 3.0 for Windows 8 Store

It’s fairly certain that Microsoft won’t be supporting XNA for non-Windows Phone platforms, so I decided to take some time to port my game to MonoGame. Just recently, the MonoGame team has released MonoGame 3.0 which includes full support for the Windows 8 Store. Follow these meager instructions to get yourself started with doing that. If you’re lucky like I was, there’s a chance that your code is almost a 100% carry-over to the MonoGame libraries.

  1. Download MonoGame 3.0 Installer
  2. Create New MonoGame Project for Windows 8 Store
    • Using Visual Studio 2012, create a new MonoGame project under Visual C# –> MonoGame –> MonoGame Game
  3. Manually Copy Code and Change References
    • Make sure MonoGame is referenced using the Windows 8 lib at C:Program Files (x86)MonoGamev3.0AssembliesWindows8MonoGame.Framework.Windows8.dll
    • Copy classes and files to the new project so that it mirrors the hierarchy of your XNA 4.0 project
    • Any libraries that are referenced which were compiled against the full .NET Framework will need to be recompiled against the .NET Core Framework (a subset of the .NET Framework that Windows Store Apps will reference)
    • Compile and fix any errors generated because of references to things that are no longer supported by Windows Store
    • Copy serialized .xnb files manually to the output directories of your MonoGame project (this is required because the Content Pipeline is not supported in Visual Studio 2012)

Some of the errors that I got were references to Close() method calls on streams (removed in .NET Core) and setting DTD validation on XmlStreams (also removed in .NET Core). See the link in the references section for an overview of the changes in .NET Core. Also, MSDN will have little green bag icons next to anything that is supported in the Window Store.

References:

http://msdn.microsoft.com/en-us/library/windows/apps/br230302.aspxRead more

How to get supported display modes using SharpDX

Below is a short bit of code that will use SharpDX to enumerate the valid display modes on all adapters (video cards) and all outputs (monitors) for the computer that is hosting the application.

There are a few caveats with this:

  • Do not run this if you are using the Windows RT device simulator from Visual Studio 2012 or you will get exceptions (remote/virtualized instances aren’t supported by some of the DirectX used here)
  • This only shows interlaced and scaling display modes (there are Stereo and StereoDisabled modes for some outputs)
  • Keep in mind that this is every adapter and output on your computer, so if you want just the default adapter, you’ll have to make some changes
  • Windows Store Apps are always in full screen, so any display mode that you apply to the active device where the resolution is less than the desktop resolution is going to look stretched (there are reasons to do this, however)

References:

Read more

Chains of Acadia: Weapon Juggling

Like I stated in my previous blog post, I wanted to implement a weapon bar that allows players to cycle through weapons for different situations. Well, I came up with what you see in the screenshot below:

You can see a couple things here (and ignore the red boxes, those are just there for development purposes). This screenshot shows off the player status bar (health, shields, weapon experience) as well as the weapon bar. The icons in the weapon bar indicate the weapon that will be used when that slot is selected. In the screenshot, I have the flamethrower selected (yea, it’s not totally obvious that it’s a fireball). I can cycle through the weapons by using the scroll wheel or pressing the number keys that correspond to the slot. For example, pressing “1” will select the first slot (which is empty here) and pressing “6” will select the last slot (which is a proximity mine). For now, the input is only keyboard based, but when I eventually try to release this game on Xbox Live Indie Games, I will be more concerned about the gamepad as well.

Now, the juggling part comes in because each weapon gains experience when used and when experience points are picked up from enemies, bosses, and puzzles. However, only the active weapon will gain the benefit of the experience gain. This adds a bit of choice regarding what you want to level up first because the experience isn’t shared! When you fill the experience bar for a weapon, it will be upgraded to a new level. This will give it a few possible benefits. It could be more damage, more ammo, faster fire rate, more projectiles per shot, or a shorter cooldown time. There are a lot of possibilities, and I’m still playing with them.

My next goal is to make the weapon types a bit more obvious. For example, the third weapon in the screenshot above is actually a rocket launcher (yea, that’s a rocket). The icons are hard to distinguish, so I am going to come up with a solution.… Read more

Read about My Game: The Chains of Acadia

I have been developing software professionally for about 5 years now, and I have been playing video games nearly my entire life. The combination of the two is something that I decided to tackle back in July of this year. Having never programmed for anything other than enterprise software, I decided to ease my way into the scene via XNA. I was already familiar with C# through my work, so it was an obvious choice to learn the basics and dip my toes into the ocean of game design.

Since I am a full-time employee, I usually only get nights and weekends to work on this project. I would love to dedicate all my time to the development of my first game, but I am constantly reminded that something has to pay the bills. Anyway, you did not come here to read about my life; you came to read about my game! I have quickly learned that game development calls for many different talents. Some of the requirements include skills that I simply do not possess. Namely, I have trouble producing quality art, sound, and music. Since I am in this alone (for now), I have to rely on the wonderful open source community to fill this important gap. I can handle the technical side no problem, but when it comes to art, yikes. Without further ado, here is my game.

The Chains of Acadia is a story of a hero. Oh, wow, how original. The thing is though, Acadia (the hero), does not know that he is a hero. When he finds out the truth, he probably will not want the status bestowed upon him. I do not want to ruin the story, so I will stop there and simply explain the style of play involved. The best way to describe the style is to picture Smash TV mixed with a slight bit of Touhou and some minor RPG elements.

Take this image from my Twitter account for example. You can see that the player is constricted on four sides by the walls of the screen. Not every screen will have this type of layout, but it will be the most common. The player has to complete several waves and challenges to proceed to the next screen. Remember in Zelda dungeons when going through a door would slide the camera to the next screen? This is similar.

Screens (maps) will make up a larger “level” that the player can explore to complete challenges, events, and puzzles. Unlike Smash TV, I want the player to have to return to certain screens for one reason or another. Maybe to pick up an item that was not available the first time around. Maybe there is a locked door that can only be opened by pushing a button or retrieving a key in another map. In order to add some fun to the mix, I have implemented a system that generates bullet patterns reminiscent of the Touhou series of games. This allows me to create some really cool challenges that the player must navigate through while attempting to destroy waves of enemies, defeat boss battles, or complete puzzles.… Read more

My Forked TiledLib Project

If you’ve used the TiledLib library by Nick Gravelyn, you’ll agree that it’s super useful and easy to understand when working with maps from the Tiled editor. Unfortunately, Nick is no longer actively developing the library, so I have created a forked copy on Bitbucket. If you’re interested in following the progress of changes I make, feel free to follow the project. I most likely won’t be making sweeping changes, but I have noticed a few bugs in the provided map processor classes. So, my plan is to slowly add some more complex examples to the map processor such as collidable tile properties and object layers.

Original Project: https://bitbucket.org/nickgravelyn/tiledlib

Tiled Map Editor: http://www.mapeditor.org/Read more

2D Circular Motion

Just a quick post today about implementing circular motion in a 2D environment.

  • Set centerX and centerY to the center of the circle (coordinates that you want your entity to move around)
  • Set the radius of the circle
  • Set the speed at which the entity should complete a full circle in seconds
  • Set the position of the entity to the results of the speedscale, x-translation, and y-translation

As time goes from 0 to 2*Pi and back to 0, the motion will complete a full circle.… Read more

Resolution Independent 2D Rendering in XNA 4

When I first started making my game, I hard coded the screen resolution to 800 x 600 for simplicity and built my menus and levels with the assumption that the screen was exactly 800 pixels wide and 600 pixels high. This was a mistake because all of my UI positions, tile positions, and entity placements were based on absolute positions and did not look proper when the resolution changed. If the user wanted to use a screen size that was not 4:3 and super tiny, the game looked completely wrong and was unplayable because the level layout was all over the place.

To solve this, I used David Amador’s Resolution class to introduce a means of rendering my scenes independent of the actual resolution of the window. I maintained an “internal” or “virtual” resolution of 1280 x 720 (Xbox standard) to be used for position of all my entities and UI elements. This virtual resolution never changes. Users can then adjust the “actual” resolution of the game which determines the real window size. We use a scaling matrix to transform the virtual resolution to fill the actual resolution with additional letterboxes or pillarboxes depending on the virtual and actual resolutions. I suggest you read the linked article from David Amador to understand the class and how to use it.

Changes for XNA 4

David’s article is what really counts when it comes making this work. However, it was written pre-XNA 4 and requires a minor change. Calls to SpriteBatch.Begin() require more parameters in the overload that allows for a transform matrix. The current method of using David’s code to scale your virtual resolution up to the actual resolution is:

Obviously, your needs will dictate the exact parameters, but this is the overload you need to use at the very basic level.

Transforming Mouse Coordinates

Another problem you’ll run into is when trying to use mouse coordinates to interact with the elements of your game. The transformation matrix is applied only to the sprite rendering and does not affect the state of the mouse cursor. For example, using a straight up MouseState.GetState() will return coordinates in terms of the actual resolution and not the virtual resolution. Since your game is working in terms of the virtual resolution, this behavior is wrong!

Luckily, one of the commentors in David’s article explained a way to transform mouse coordinates into the virtual screen space. Here is a simple static abstraction that I created to get mouse position in terms of virtual resolution.

First, add two static members to the Resolution class.

Second, assign values in the ResetViewport() method.

Read more

On Game Input and Response (Mouse, Keyboard, and Controller)

The Importance of Input

One of the large distinctions between video games and other forms of entertainment is the ability for the user to provide input to directly affect the state of the system. In essence, the user is driving the medium and has direct leverage over the future of their character(s) within the rules of the system. This uniqueness places a large burden on the designers to provide a good system of input for the users. Such a system can be the difference between maintaining loyal users and being completed ignored or negatively criticized.

When users play games, not much is worse than delayed/confusing controls or input with very little visual or aural feedback to indicate action occurrence and consequence. Think about that for a second. Try to think about how we manipulate the world in our actual lives. When you lift a book, open a page, or slide something across a table, action and response is immediate. Unfortunately, manipulating in a game system is never 100% immediate because there are levels of abstraction between you and the electrons. However, a designer can certainly work around this annoyance to provide a smooth experience. There are several considerations to maintain in order to achieve good input and feedback, and it is slightly dependent on the control schema available. (mouse, controller, headset, etc…)

Mouse and Keyboard

On the PC, the mouse and keyboard are kings. There are other ways of controlling your computer through touch interfaces, headsets, speech, and USB controllers, but the majority of the time is spent using a mouse and keyboard. In my personal opinion two of the largest sins regarding mouse input is the application of mouse acceleration and the occurrence of “soupy” mouse movement. The former is a large point of debate and the latter is a consequence of bad design and possibly video settings.

Mouse acceleration is the acceleration of the mouse cursor as you move your mouse at variable velocities. Moving the mouse from one corner of your mouse pad to another at a crawl will move the cursor on the screen a smaller distance than if you jerked the mouse across the mouse pad. This is because the mouse acceleration is trying to help with precision pointing at small velocities and reduce physical movement at large velocities. Honestly, I can see where it  might be helpful for some scenarios, but when it comes to games, I hate the inconsistent mouse movement that is a result of the acceleration kicking in. When I play games like Counter-Strike, reliable mouse movement is huge. “Flickshotting” where the user jerks the mouse from one point to another for a quick AWP kill is more difficult to achieve when mouse acceleration is on due to the variable velocity. No one will move from point A to point B on their mouse pad with the exact same velocity every time. Because of that, the actual translation of the mouse on the screen will fluctuate. Maybe this is not as important for slower games, but I still want the translation of my physical mouse to match up with the translation of the cursor regardless of the speed at which I am operating.… Read more