Blogging Division
Posts about C# in general.
Last updated: 2012-02-14 This is a big post – over 12200 16600 words – and so I’ve decided to make it available as a PDF download, which you can get here: http://www.bobtacoindustrie... It has bookmarks for easier navigation along with a Table of Contents and page numbers. I expect that I will revise this from time to time and welcome any suggestions, feedback, and (especially) corrections. If so I will update the Last updated field at the top and will ......
Last updated: 2012-02-14 This is a big post – over 12200 16600 words – and so I’ve decided to make it available as a PDF download, which you can get here: http://www.bobtacoindustrie... It has bookmarks for easier navigation along with a Table of Contents and page numbers. I expect that I will revise this from time to time and welcome any suggestions, feedback, and (especially) corrections. If so I will update the Last updated field at the top and will ......
One thing I’ve always enjoyed in Silverlight/WPF are the easing functions ( http://msdn.microsoft.com/e... ). The easing functions are commonly used to provide interesting looking animations via key frame-based interpolation. XNA has a few, limited bits of interpolation built in (primarily Lerp (i.e. linear interpolation) and SmoothStep (i.e. cubic interpolation)). For a sprite animation project that I’ve since set aside (it’s not dead, but it’s been back-burnered for a while ......
For the longest time, the Content Pipeline was a magic transmogrification device to me. I would add content to a content project and it would get mystically turned into stuff I would load in my game with ContentManager. A few months ago I decided it was time to put an end to its magical aspects and learn how it worked and how I could put it to work. I thought it would be helpful to share what I learned so I created a sample. This sample has two different custom extensions. The first is a complete ......
I realized that I’ve given several people recommendations on how to deal with resuming a game from tombstoning on Windows Phone 7 over Twitter in the past month or so. So I figured I would write up my thoughts on it. There is no perfect and objectively correct solution. But there are certain common sense things that I believe will help make every gamer’s experience great. First: Read these: http://msdn.microsoft.com/e... and http://create.msdn.com/en-U... ......
XNA Games in Windows are hosted within a Windows Forms Form. This allows you access to many special Windows-only features, such as drag and drop, provided that you know the right code to put in to get access to that form. Someone on the App Hub forums had asked earlier today about how to enable drag and drop for a Windows-only XNA game. Since it sounded like a neat thing to learn how to do, I coded up a quick sample to display it. As always, the code is heavily commented so that it should be easy ......
Many times I’ve found myself wondering how much GC memory some operation allocates. This is primarily in the context of XNA games due to the desire to avoid generating garbage and thus triggering a GC collection. Many times I’ve written simple programs to check allocations. I did it again recently. It occurred to me that many XNA developers find themselves asking this question from time to time. So I cleaned up my sample and published it on my website. Feel free to download it and put it to use. ......
Most XNA programmers are concerned about generating garbage. More specifically about allocating GC-managed memory (GC stands for “garbage collector” and is both the name of the class that provides access to the garbage collector and an acronym for the garbage collector (as a concept) itself). Two of the major target platforms for XNA (Windows Phone 7 and Xbox 360) use variants of the .NET Compact Framework. On both variants, the GC runs under various circumstances (Windows Phone 7 and Xbox 360). ......
Anyone who has read the Windows Phone 7 Application Certification Requirements (PDF) knows that a WP7 game can never be more than two taps of the Back button away from quitting the game. In XNA this is easy since the Game class provides a method called Exit that can be called with relative ease. In Silverlight nothing quite so easy exists. One clever hack that’s been making the rounds is to create a new instance of the XNA Game class and call its Exit method. However this solution, clever though ......
One of the new features of XNA 4.0 is the Content Project. Those of us who’ve worked in XNA 3.1 and earlier are familiar with the old Content folder, which was simply a folder inside your game project into which you’d place your raw content and from which your game would load the compiled XNB files. In theory it could be named anything since one of the things you would do in the constructor for your game is specify the name of the Content folder. XNA 4.0 has moved content (i.e. game assets like music, ......
Full C# Archive