Posts
67
Comments
120
Trackbacks
0
C#
Posts about C# in general.
C# to C++–A Somewhat Short Guide (Update 1)
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 ......
Posted On Tuesday, February 14, 2012 1:52 PM | Comments (0)
C# to C++ – A Somewhat Short Guide
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 ......
Posted On Thursday, February 2, 2012 8:45 AM | Comments (10)
Interpolation Sample for XNA
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 ......
Posted On Saturday, August 6, 2011 3:23 PM | Comments (0)
XNA Custom Content Pipeline Extensions Sample
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 ......
Posted On Sunday, May 8, 2011 2:33 AM | Comments (0)
WP7 Games: Recommendations on Resuming
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... ......
Posted On Thursday, April 14, 2011 11:44 PM | Comments (3)
Drag and Drop in a Windows XNA Game
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 ......
Posted On Sunday, March 27, 2011 2:05 PM | Comments (1)
CheckMemoryAllocationGame Sample
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. ......
Posted On Tuesday, March 1, 2011 11:30 AM | Comments (0)
List of Commonly Used Value Types in XNA Games
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). ......
Posted On Thursday, February 17, 2011 4:19 AM | Comments (2)
Properly Exiting Silverlight-based WP7 Games
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 ......
Posted On Sunday, August 22, 2010 4:38 PM | Comments (0)
Tutorial: Turning a Solution into a Template for XNA 4.0 (and Visual Studio 2010 In General!)
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, ......
Posted On Thursday, August 5, 2010 5:36 AM | Comments (4)
Full C# Archive
Bob Taco Industries is an ISV focused on game and app development for Microsoft platforms headed up by Michael B. McLaughlin. Mike is a Microsoft Visual C++ MVP (previously an XNA/DirectX MVP from 2011-2013), a developer, a writer, a consultant, and a retired lawyer. If you're a developer who is just getting started, consider checking out the BTI website's section for developers for links to code samples and other helpful sites.
Tag Cloud