<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>RB Whitaker&#039;s Wiki - new forum posts</title>
		<link>http://rbwhitaker.wikidot.com/forum/start</link>
		<description>Posts in forums of the site &quot;RB Whitaker&#039;s Wiki&quot; - A Game Development Launchpad</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 22 May 2013 03:10:36 +0000</lastBuildDate>
		
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-121403#post-1775970</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-121403/future-plans#post-1775970</link>
				<description></description>
				<pubDate>Thu, 16 May 2013 01:54:34 +0000</pubDate>
				<wikidot:authorName>Big Joe</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Networking tutorials would be awesome!!!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-121403/future-plans">Future Plans</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136040#post-1775700</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases#post-1775700</link>
				<description></description>
				<pubDate>Wed, 15 May 2013 20:22:27 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Interesting&#8230; I'm not sure I've seen that before. It looks like maybe you've got your AnimatedSprite.cs file in your content project instead of your main game project.</p> <p>If you look in the Solution Explorer, you'll see at the top, your solution. If I called my game Purple Monkey Dishwasher, I'd expect my top level solution node to be labeled something like &quot;Solution 'PurpleMonkeyDishwasher' (2 projects)&quot;. (I'm going from memory here.)</p> <p>You should see immediately under that, your two projects. Each project will have a whole pile of different junk under it (things like References, Properties, your Program.cs file, your Game1.cs file, etc.). But there should be two projects. The first one will probably be called &quot;PurpleMonkeyDishwasher&quot;, not to be confused with the top level solution, which has the same name. The second project will probably be called &quot;PurpleMonkeyDishwasherContent&quot;. And it might say something about being a content project. This is where you've been putting your content, like your images, 3D models, sound, etc.</p> <p>The new code file, AnimatedSprite.cs, needs to go in the first project, by all of the other code. You don't want it in the content project.</p> <p>The problem you're describing sounds very much like the new file got put in the wrong place, and XNA is thinking it must be some sort of content for your game, but it can't figure out what to do with it.</p> <p>So check and see if the file is in the wrong project, and move it to the first code-based project, and let me know if that fixes things.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases">Troubleshooting: Texture Atlases</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136040#post-1775349</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases#post-1775349</link>
				<description></description>
				<pubDate>Wed, 15 May 2013 14:44:01 +0000</pubDate>
				<wikidot:authorName>Martien</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I followed your tutorials so far, very nice btw!<br /> But now I get an error:<br /> Error 1 Cannot autodetect which importer to use for &quot;AnimatedSprite.cs&quot;. There are no importers which handle this file type. Specify the importer that handles this file type in your project. Content\AnimatedSprite.cs</p> <p>Could you please help me?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases">Troubleshooting: Texture Atlases</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-652296#post-1773771</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array#post-1773771</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 21:02:50 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Cool. Glad you got it working!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-503425">Realm Factory / General Questions about Realm Factory</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array">Index was outside the bounds of the array.</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-652296#post-1773663</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array#post-1773663</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 18:38:08 +0000</pubDate>
				<wikidot:authorName>CuriousGeorge</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Nevermind again! I struggled for a while, but I managed to create a rectangle that checks for each tile by looping through rows/columns along with the tileID.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-503425">Realm Factory / General Questions about Realm Factory</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array">Index was outside the bounds of the array.</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-652296#post-1773606</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array#post-1773606</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 18:06:16 +0000</pubDate>
				<wikidot:authorName>CuriousGeorge</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Nevermind that. I figured out how to fix it but now I'm stuck at another problem. Why isn't there a rectangle implemented in the tile class? I can't do tile collisions without a rectangle.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-503425">Realm Factory / General Questions about Realm Factory</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array">Index was outside the bounds of the array.</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-652296#post-1773591</guid>
				<title>Index was outside the bounds of the array.</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array#post-1773591</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 17:58:21 +0000</pubDate>
				<wikidot:authorName>CuriousGeorge</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>When I try this piece of code here I saw on the forums</p> <p>Tile tile = (Tile)currentLevel.GetTile(row, column);</p> <p>I get the error &quot;Index was outside the bounds of the array.&quot;. What is it and how do I fix that?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-503425">Realm Factory / General Questions about Realm Factory</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-652296/index-was-outside-the-bounds-of-the-array">Index was outside the bounds of the array.</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1773506</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1773506</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 16:17:49 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Generally, the input is the only change that is required. In XNA Game Studio, you just create a copy of your project for the Xbox 360, and away you go. Note, there's a specific menu option for this that allows two different projects that build for different target environments, while maintaining the exact same code base for the two. Don't actually go copy the project directory on your hard drive, or you'll have to maintain two code bases for Windows and the Xbox. You don't want that.</p> <p>In practice, though, there may be a little more work to do than just code a different input device. For instance, you want to think through how the devices are different, how the user bases are different, and how the thing is actually used. Not every game that's good for the PC is good for a console, and not every game that's good for a console is good for the PC.</p> <p>As an example, RTS games are usually not a good fit for consoles. You just don't have the right input (mouse and keyboard) to select units and give them specialized orders very well. (The only console RTS game of consequence that I've seen is Halo Wars. They clearly did everything they could to design it for a console, and I'm not sure if it would be very useful, in exactly the same format, on a PC. It requires a different strategy.</p> <p>So while the code itself will work on both platforms, there's more to consider than that. I suspect whatever game you want to make, it is worth spending time thinking about what platforms you want to target, and consider how things will be different among them.</p> <p>Hmm&#8230; one other area that is worth pointing out, which you'll likely find will require different code is any networking for multi-player. On the Xbox, they've got things strapped down pretty tightly. You have to code things the right way (I apologize that I don't really have networking tutorials here yet) and your users will likely need to pay for a subscription to use the network on the Xbox. The rules are very different on the PC. Of course, this all depends on you wanting networked multi-player games to begin with.</p> <p><strong>I've probably gone on long enough for now, but just to summarize, with only a few exceptions your code will work in both places without requiring changes, but you should still consider how the different platforms are commonly used, and their limitations when designing your game.</strong></p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1773112</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1773112</link>
				<description></description>
				<pubDate>Mon, 13 May 2013 06:59:57 +0000</pubDate>
				<wikidot:authorName>me fg</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi =)<br /> To create a xbox360 game do i need to change something in my program code except the input lines or it is exactly the same like a windows game?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-133557#post-1767736</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-133557/troubleshooting:xna-project-template#post-1767736</link>
				<description></description>
				<pubDate>Mon, 06 May 2013 12:07:28 +0000</pubDate>
				<wikidot:authorName>Simon</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>The gamedoes'twork me help p</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-133557/troubleshooting:xna-project-template">Troubleshooting: XNA Project Template</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-389591#post-1757449</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-389591/troubleshooting:classes-part-2:creating-them#post-1757449</link>
				<description></description>
				<pubDate>Sun, 21 Apr 2013 21:11:56 +0000</pubDate>
				<wikidot:authorName>William McHugh</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Please disregard this, you cover getters and setters in your next lesson.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-389591/troubleshooting:classes-part-2:creating-them">Troubleshooting: Classes Part 2: Creating Them</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-389591#post-1757444</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-389591/troubleshooting:classes-part-2:creating-them#post-1757444</link>
				<description></description>
				<pubDate>Sun, 21 Apr 2013 21:06:03 +0000</pubDate>
				<wikidot:authorName>William McHugh</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I don't think this is an error, but I do not see a place where we set the number of lives. When I debugged the application, it does not run through the while loop in main. Like I said, this may not be an error as you may cover this in later lessons. Thanks for a fantastic site!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-389591/troubleshooting:classes-part-2:creating-them">Troubleshooting: Classes Part 2: Creating Them</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136044#post-1751815</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136044/troubleshooting:additive-sprites#post-1751815</link>
				<description></description>
				<pubDate>Fri, 12 Apr 2013 15:59:02 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>That's a great question, Erik. I think you could argue it either way. You're hitting on the point about how in <em>Update</em>, you should nothing but update your game state, and in <em>Draw</em>, you should do nothing but drawing things, and the two should never mix.</p> <p>So the question that remains to be answered here is, what constitutes my game state?</p> <p>When I wrote this code, I had in mind that the game state defined these three objects by a distance and direction from the origin. That is, everything was essentially defined in <a href="http://en.wikipedia.org/wiki/Polar_coordinate_system">polar coordinates</a>. So in my <em>Update</em> method, I simply update those polar coordinates. When I'm drawing, I need things in the normal Cartesian coordinates (because that's what the screen works with) so I convert it to Cartesian at the last moment, in the <em>Draw</em> method. In this case, I treat it as a part of getting stuff drawn to the screen, and not a part of the underlying model for my game.</p> <p>In fact, what I did is not all that different from building a world transformation matrix in 3D, which is a normal operation to do at draw time. I'm simply converting from one coordinate system to another.</p> <p>Obviously, not everyone is going to use polar coordinates for their underlying game model. (I'd say, more often than not, you'll be using Cartesian instead.) In the event that you see your game state as being done in Cartesian coordinates, this computation with the sines and cosines <strong>should</strong> most definitely be done in the <em>Update</em> method, as you suggest.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136044/troubleshooting:additive-sprites">Troubleshooting: Additive Sprites</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136044#post-1751624</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136044/troubleshooting:additive-sprites#post-1751624</link>
				<description></description>
				<pubDate>Fri, 12 Apr 2013 08:57:14 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I'd like to know why all that cosinus/sinus stuff goes into the Draw-section and not the Update-section. I mean, it's not actual drawing, it's just calculating the position of the sprites, right?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136044/troubleshooting:additive-sprites">Troubleshooting: Additive Sprites</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642244#post-1750140</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader#post-1750140</link>
				<description></description>
				<pubDate>Wed, 10 Apr 2013 14:37:51 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Sorry bout that..I can barely read apparently LOL&#8230;.I found a tutorial for this&#8230;not read the entire piece but the tut's on this site have seemed pretty good.</p> <p>riemers(dot)net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map(dot)php</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader">Shadow shader</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-621958#post-1749989</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-621958/sharpdx-toolkit-emphasis-or-not#post-1749989</link>
				<description></description>
				<pubDate>Wed, 10 Apr 2013 09:58:05 +0000</pubDate>
				<wikidot:authorName>Bob</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I vote for a more pure, barebones approach. No doubt, parts of the toolkit will probably be too useful to ignore, but the main gameloop, input capture etc&#8230; are all an integral part of game development, and it would be a shame to hide it away by the liberal use of a toolkit. And after all, if someone just wants XNA all over again, they can use mono. ; )</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-676887">SharpDX / SharpDX Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-621958/sharpdx-toolkit-emphasis-or-not">SharpDX Toolkit emphasis, or not?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642244#post-1749942</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader#post-1749942</link>
				<description></description>
				<pubDate>Wed, 10 Apr 2013 07:00:48 +0000</pubDate>
				<wikidot:authorName>MstVir</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Man I asked for shadowing shader tutorial. I am still learning HLSL following tutorials in this site, but there is not any tutorial about shadows and as you know shadowing is one of most common effects used in modern games.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader">Shadow shader</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-121403#post-1749940</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-121403/future-plans#post-1749940</link>
				<description></description>
				<pubDate>Wed, 10 Apr 2013 06:56:50 +0000</pubDate>
				<wikidot:authorName>Malla</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Enjoyed your particles tutorial for 2d games.<br /> Would really like to see a tutorial on game phases, like going from the menu to gameplay.<br /> Great website. Bookmarked and looking forward to future stuff :)</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-121403/future-plans">Future Plans</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-621403#post-1749452</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame#post-1749452</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 15:19:40 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>For some reason MonoGame gives a wrong path to the sdl.dll. Search your HDD for sdl.dll and put it into the folder where VS 2010 is looking for it.<br /> In my case &quot;C:\Users\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsGL&quot;. I had to create all those folders below \Users\ manually.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame">Troubleshooting: Setting Up MonoGame</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-621403#post-1749436</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame#post-1749436</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 15:02:19 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>You have to install MonoGame for Xamarin, not MonoGame for MonoDevelop.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame">Troubleshooting: Setting Up MonoGame</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642244#post-1749424</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader#post-1749424</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 14:41:24 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>There are a few tutorials on HLSL(High Level Shader Language) in the XNA section. Covers several aspects of shaders. Wont let me post a link but you just need to use the Tutorials dropdown, select XNA tutorials and navigate down to Effects &amp; HLSL Tutorials. Hope this is what you were looking for.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader">Shadow shader</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-388466#post-1749334</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-388466/troubleshooting:arrays#post-1749334</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 11:03:39 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Wait there aren't. Sorry, my fault.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-388466/troubleshooting:arrays">Troubleshooting: Arrays</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-388466#post-1749333</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-388466/troubleshooting:arrays#post-1749333</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 11:01:21 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>&quot;int[] scores = new int[10];<br /> In the earlier example, we had not yet assigned a value to an array. In this second example, our array now exists, and has 10 items in it.&quot;</p> <p>Actually there are 11 items in it :)</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-388466/troubleshooting:arrays">Troubleshooting: Arrays</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642244#post-1748996</guid>
				<title>Shadow shader</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader#post-1748996</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 21:18:01 +0000</pubDate>
				<wikidot:authorName>MstVir</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>It would be nice if you will add tutorials about shadowing. I really enjoy your tutorials. Thanks for your work.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642244/shadow-shader">Shadow shader</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642037#post-1748869</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642037/ebook#post-1748869</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 16:18:15 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Thank you for the fast (and extensive!) reply. I kind of expected that there wasn't an ebook (yet) but I had to try at least ;)<br /> I also wouldn't really want to implore on you concerning that PDF so I think I'll just have to kill those trees and buy the real thing.<br /> Maybe you'd like to set up some online shop thingy for the next edition. I'd wager you'd get a higher share that way too.<br /> Thanks again and best of luck with that conversion to Mono!</p> <p>PS: I browsed and borrowed quite a few C#/XNA books and so far I like your way of writing and teaching best. Maybe your viewpoint as a game developer clings to me more than others.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580408">Website Discussion and Feedback / Other</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642037/ebook">ebook?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642037#post-1748847</guid>
				<title>Re: ebook?</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642037/ebook#post-1748847</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 15:37:04 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Erik,</p> <p>I'm glad to hear you're interested in my book. As of right now, there's no ebook. I'd really like there to be. My plan all along was to make one.</p> <p>But when I got done publishing, and went to make an ebook out of it, I learned that it wasn't so simple. Basically, things are set up in a way to encourage $1-$5 books. That works for novels, but not for books like this. All price points up to and including the $25 that the physical book costs. It's quite strange, I know. So I want to find another avenue for selling an ebook version, but that's probably not going to happen in the next few weeks.</p> <p>The only thing I can think if might be to just email you a PDF (does that meet your needs) of the book that I had intended to publish as an ebook, and then send you a PayPal payment for the $15 that I had intended (still intend) to sell the ebook for. I have never done that process before, so we'd both be figuring it out as we go. I know PDFs don't work for some people, and I know PayPal doesn't work for others. That's fine, if that's the case with you, too. I just wanted to put it out there, in case you thought it might be worthwhile.</p> <p>Anyway, I wanted to at least put the information out there, to give you an answer to your question. (You and I both, would rather have my answer be, &quot;Oh, sure, just go over here and get it!&quot; Maybe some day&#8230;)</p> <p>Thanks again for your interest!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580408">Website Discussion and Feedback / Other</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642037/ebook">ebook?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-642037#post-1748766</guid>
				<title>ebook?</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-642037/ebook#post-1748766</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 13:00:57 +0000</pubDate>
				<wikidot:authorName>Erik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>This book looks very promising and interesting to me. But is there any way to get an ebook version of it? I kind of dislike having so many books lie around&#8230;</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580408">Website Discussion and Feedback / Other</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-642037/ebook">ebook?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-640973#post-1747126</guid>
				<title>picking sample modification</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-640973/picking-sample-modification#post-1747126</link>
				<description></description>
				<pubDate>Fri, 05 Apr 2013 16:08:17 +0000</pubDate>
				<wikidot:authorName>football94</wikidot:authorName>				<wikidot:authorUserId>1594501</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ive been searching all over for a step by step tutorial of a ray triangle picking intersection sample (heightmap terrain) but the only thing to come close is the xna picking sample at the xna live website which I cant quite wrap my head around . I was hoping if you could modify your picking sample to create an easy to understand tutorial on this subject. THANKYOU</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-640973/picking-sample-modification">picking sample modification</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-388475#post-1744029</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-388475/troubleshooting:enumerations#post-1744029</link>
				<description></description>
				<pubDate>Tue, 02 Apr 2013 08:09:59 +0000</pubDate>
				<wikidot:authorName>Kol</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>When doing the final part of this tutorial&#8230; specifically&#8230;</p> <p>int dayAsInt = (int)DaysOfWeek.Sunday;<br /> DaysOfWeek today = (DaysOfWeek)dayAsInt; // but this is an implicit cast, so&#8230;<br /> DaysOfWeek tomorrow = (dayAsInt + 1); // so you can do this, without explicitly stating the cast</p> <p>In the last line defining the 'tomorrow' variable C# marks this part as an error&#8230;<br /> (dayAsInt + 1)</p> <p>And gives this error description in the error list window.<br /> Cannot implicitly convert type 'int' to DaysOfWeek'. An explicit conversion exists (are you missing a cast?)</p> <p>I understand what the example is trying to teach. That you can increment and decrement enumerations like integers.<br /> Which would be valueable in game programming such as the old Heroes of Might and Magic games where the days of<br /> the week would be tracked because various things occured on different days. Such as new troops being hirable ever Sunday.</p> <p>I tried on my own to get this line working and even went back to the type casting tutorial to see if I<br /> could find anything there to help me out. I managed to get something that outputs the correct<br /> results, in this case printing that tomorrow will be monday. But I still wanted to make sure I notified<br /> you of the issue I encountered and also to ask if how I did it was correct.</p> <p>I replaced this line&#8230;<br /> DaysOfWeek tomorrow = (dayAsInt + 1); // so you can do this, without explicitly stating the cast</p> <p>With this one&#8230;<br /> DaysOfWeek tomorrow = (DaysOfWeek)dayAsInt + 1; // so you can do this, without explicitly stating the cast</p> <p>Is there anything wrong with the way I did it?</p> <p>Was I perhaps missing something with the way yours was in the tutorial that was causing it not to work?<br /> (I did have the days of the week properly enumerated outside of the class.)</p> <p>Thank you in advance for your time and thank you very much for the tutorials. They have been a god send!<br /> For once I feel like I'm actually LEARNING programming and not just typing stuff in without any<br /> understanding of the mechanics of it.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-388475/troubleshooting:enumerations">Troubleshooting: Enumerations</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-551629#post-1743059</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-551629/multiplayer-and-networking#post-1743059</link>
				<description></description>
				<pubDate>Mon, 01 Apr 2013 11:36:58 +0000</pubDate>
				<wikidot:authorName>Daryl</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I came here to request some networking tutorials too, but found lots of people have already requested so thought that I would just add my +1 to the request :)</p> <p>Great work on the tutorials so far. Maybe cover the differences between C# sockets and the XNA way of doing things?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580406">Website Discussion and Feedback / Tutorial Requests</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-551629/multiplayer-and-networking">Multiplayer and networking</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-638633#post-1741697</guid>
				<title>Random parameter in Constructor</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-638633/random-parameter-in-constructor#post-1741697</link>
				<description></description>
				<pubDate>Sat, 30 Mar 2013 15:25:06 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I created a seperate class for making a sprite randomly change directions and the constructor looks like this:</p> <div class="code"> <pre> <code>public RandomDirectionSprite(Texture2D textureImage, Vector2 position, Point frameSize, int collisionOffset, Point currentFrame, Point sheetSize, Vector2 speed, string collisionCueName, SpriteManager spriteManager, Random randomDirection) : base(textureImage, position, frameSize, collisionOffset, currentFrame, sheetSize, speed, collisionCueName) { this.spriteManager = spriteManager; this.randomDirection = randomDirection; DirectionTimer(); }</code> </pre></div> <p>Now, I also created a Sprite Manager which adds a sprite to a list like this:</p> <div class="code"> <pre> <code>spriteList.Add(new EvadingSprite(Game.Content.Load&lt;Texture2D&gt; (@&quot;images\plus&quot;), position, new Point(75, 75), 10, new Point(0, 0), new Point(6, 4), speed, &quot;skullcollision&quot; , this,*//&lt;Random should go here&gt;//*));</code> </pre></div> <p>I'm not sure how to put the Random parameter in. That is how do I add it in.</p> <p>Here is the Timer that appears in my RandomDirectioinSprite class along with the other variables that are used to make it:</p> <div class="code"> <pre> <code>private void DirectionTimer() { nextDirectionTimer = randomDirection.Next( directionTimerMin, directionTimerMax); }</code> </pre></div> <p>Anyway, I hope my question makes sense, and I thank anyone who can help!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-638633/random-parameter-in-constructor">Random parameter in Constructor</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-621403#post-1741119</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame#post-1741119</link>
				<description></description>
				<pubDate>Fri, 29 Mar 2013 16:56:47 +0000</pubDate>
				<wikidot:authorName>M1k4</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Could you please make a tutorial on how to install it on visual studio 2010?<br /> I'm getting some problems with the SDL.dll path.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-621403/troubleshooting:setting-up-monogame">Troubleshooting: Setting Up MonoGame</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136057#post-1740748</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136057/troubleshooting:mesh-by-mesh-animation#post-1740748</link>
				<description></description>
				<pubDate>Fri, 29 Mar 2013 02:43:13 +0000</pubDate>
				<wikidot:authorName>Richard</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello, I was checking out your mesh-by-Mesh animation and I was trying to integrate it with your Skybox animation. Could you perhaps post a tutorial or link on how to do this?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136057/troubleshooting:mesh-by-mesh-animation">Troubleshooting: Mesh-by-Mesh Animation</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1739724</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1739724</link>
				<description></description>
				<pubDate>Wed, 27 Mar 2013 23:42:01 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Awesome! Glad you got it to work!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1739721</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1739721</link>
				<description></description>
				<pubDate>Wed, 27 Mar 2013 23:24:18 +0000</pubDate>
				<wikidot:authorName>Ben</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Yes, that worked! I have been trying to figure this out for weeks.</p> <p>This is what I ended up with.</p> <p>public void update()<br /> {<br /> GamePadState current = GamePad.GetState(PlayerIndex.One);</p> <p>if (current.Buttons.A == ButtonState.Pressed &amp;&amp; previous.Buttons.A == ButtonState.Released)<br /> {<br /> for (int i = 0; i &lt; 12; i++)<br /> buttons[i] = false;<br /> buttons[0] = true;<br /> }</p> <p>if (current.Buttons.B == ButtonState.Pressed &amp;&amp; previous.Buttons.B == ButtonState.Released)<br /> {<br /> for (int i = 0; i &lt; 12; i++)<br /> buttons[1] = true;<br /> }</p> <p>previous = current;<br /> }</p> <p>public bool aPress()<br /> {<br /> return buttons[0];<br /> }</p> <p>Thank you so much. I couldn't take much more frying my brain over that one. I am more than likely going to buy your book as well.</p> <p>Take care.</p> <p>Ben</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-121403#post-1739696</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-121403/future-plans#post-1739696</link>
				<description></description>
				<pubDate>Wed, 27 Mar 2013 22:30:58 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks Joe. I'm planning on making more tutorials! I'm putting together some networking stuff for a game that I'm making myself. Perhaps as I do that, that would be the time for the networking tutorials. I'm glad you're liking my work!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-121403/future-plans">Future Plans</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-121403#post-1738902</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-121403/future-plans#post-1738902</link>
				<description></description>
				<pubDate>Tue, 26 Mar 2013 22:02:43 +0000</pubDate>
				<wikidot:authorName>joe</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Dude, I freekin' love this site. I hope that you keep making more tutorials!!</p> <p>P.S. you should started on those networking tutorials :D</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-121403/future-plans">Future Plans</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1738335</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1738335</link>
				<description></description>
				<pubDate>Mon, 25 Mar 2013 23:58:30 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'd have to see the code that calls this to be sure, but I think the problem is that you're assigning <em>previous = current;</em>. Those are class level instance variables, right? (As in, defined up at the top of the class, outside of any method, but inside of the class definition itself.)</p> <p>Basically, in this method, you're checking whether the old state and the new state are different. But because you're assigning <em>current</em> to <em>previous</em>, in the second method (<em>bButtonPressed</em>?) the two will be the same object. The button states will never be different, and you'll never see the button presses, as you're describing.</p> <p>I'd structure it a little more like this (though note I'm not using a compiler, and things may not be exact or even compile):</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">override</span><span class="hl-code"> </span><span class="hl-identifier">Update</span><span class="hl-brackets">(</span><span class="hl-identifier">GameTime</span><span class="hl-code"> </span><span class="hl-identifier">gameTime</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-comment">// or whatever method you're calling this from...</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">GamePadState</span><span class="hl-code"> </span><span class="hl-identifier">current</span><span class="hl-code"> = </span><span class="hl-identifier">GamePad</span><span class="hl-code">.</span><span class="hl-identifier">GetState</span><span class="hl-brackets">(</span><span class="hl-identifier">PlayerIndex</span><span class="hl-code">.</span><span class="hl-identifier">One</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">bool</span><span class="hl-code"> </span><span class="hl-identifier">aPressed</span><span class="hl-code"> = </span><span class="hl-identifier">aButtonPressed</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">bool</span><span class="hl-code"> </span><span class="hl-identifier">bPressed</span><span class="hl-code"> = </span><span class="hl-identifier">bButtonPressed</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">aPressed</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-comment">// do something if A is pressed.</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">bPressed</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-comment">// do something if B is pressed.</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-comment">// Only do this one time here, not in the other methods.</span><span class="hl-code"> </span><span class="hl-identifier">previous</span><span class="hl-code"> = </span><span class="hl-identifier">current</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">bool</span><span class="hl-code"> </span><span class="hl-identifier">aButtonPress</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">previous</span><span class="hl-code">.</span><span class="hl-identifier">Buttons</span><span class="hl-code">.</span><span class="hl-identifier">A</span><span class="hl-code"> == </span><span class="hl-identifier">ButtonState</span><span class="hl-code">.</span><span class="hl-identifier">Released</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">current</span><span class="hl-code">.</span><span class="hl-identifier">Buttons</span><span class="hl-code">.</span><span class="hl-identifier">A</span><span class="hl-code"> == </span><span class="hl-identifier">ButtonState</span><span class="hl-code">.</span><span class="hl-identifier">Pressed</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">false</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">bool</span><span class="hl-code"> </span><span class="hl-identifier">bButtonPress</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">previous</span><span class="hl-code">.</span><span class="hl-identifier">Buttons</span><span class="hl-code">.</span><span class="hl-identifier">B</span><span class="hl-code"> == </span><span class="hl-identifier">ButtonState</span><span class="hl-code">.</span><span class="hl-identifier">Released</span><span class="hl-code"> &amp;&amp; </span><span class="hl-identifier">current</span><span class="hl-code">.</span><span class="hl-identifier">Buttons</span><span class="hl-code">.</span><span class="hl-identifier">B</span><span class="hl-code"> == </span><span class="hl-identifier">ButtonState</span><span class="hl-code">.</span><span class="hl-identifier">Pressed</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">true</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">false</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>Does that make sense? Does it accomplish what you were trying to do?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136064#post-1738277</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input#post-1738277</link>
				<description></description>
				<pubDate>Mon, 25 Mar 2013 22:09:09 +0000</pubDate>
				<wikidot:authorName>Ben</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I can't figure this out.</p> <p>Both functions work independently so I'm only going to type one.</p> <p>public bool aButtonPress()<br /> {<br /> if (previous.Buttons.A == ButtonState.Released &amp;&amp; current.Buttons.A == ButtonState.Pressed)<br /> {<br /> previous = current;<br /> return true;<br /> }<br /> previous = current;<br /> return false;<br /> }</p> <p>If I put aButtonPress() over bButtonPress() then only aButtonPress() will execute and vice versa. Why is that?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136064/troubleshooting:xbox-controller-input">Troubleshooting: Xbox Controller Input</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136040#post-1736559</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases#post-1736559</link>
				<description></description>
				<pubDate>Sat, 23 Mar 2013 02:39:34 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>				<wikidot:authorUserId>1583810</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I guess this question is along the lines of this tutorial, I want to make it so that when I press a button in the game, the player sprite will update, rather than it updating constantly.</p> <p>Basically I'm making a top down shooter, and when the '2' key is pressed I want the playersprite to change to a player with a gun that can now shoot.</p> <p>Any helpful Ideas?</p> <p>thanks</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136040/troubleshooting:texture-atlases">Troubleshooting: Texture Atlases</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136038#post-1736554</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136038/spritebatch-basics#post-1736554</link>
				<description></description>
				<pubDate>Sat, 23 Mar 2013 02:25:21 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi, back again, and I've run into a wall (sorta). I want to remove a sprite at command (using a key) then replace it with a new one. how exactly do I tell the game to remove the sprite without crashing? I basically first just want the player to disappear, then the next step would be to replace it with a new one.</p> <p>I can't use Texture Atlas' or Sprite Sheets because the game is a Top Down Shooter, and I'm unsure how a spritesheet would affect player rotation.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136038/spritebatch-basics">Spritebatch Basics</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635999#post-1736536</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem#post-1736536</link>
				<description></description>
				<pubDate>Sat, 23 Mar 2013 01:33:40 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I figured those If statements would block traversing out of screen, but yeah&#8230;wasn't a problem on the left side and no, I didn't add code to block going beyond Zero on the left.</p> <p>I used a ship i drew tht was 150x150pixels, with a scale factor of .5f so, if i think that makes it 75x75pixels then. I figured out that it draws the pixle from the LEFT side, going 75Pixels to the RIGHT, so that helped me out. I'm good with tinkering/learning at same time.</p> <p>My question was really just &quot;Is what is happening on the right side of the screen normal or not.&quot; But, from what you've said, it sounds as if it should be doing the same on the Left side as well. Not sure why it's not. I've added nothing in to prohibit it.</p> <p>So, guess I will just add those If Statements in to stop it. Thanks for the response and the lessons. The XNA tutorials are very helpful!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem">Fullscreen Problem</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-630209#post-1736448</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-630209/thank-you#post-1736448</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 22:15:32 +0000</pubDate>
				<wikidot:authorName>lior</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I would definitely also like to say thanks to your tutorial I think I knew all of it up to #20<br /> but from that point it was the most well put and efficient tutorial I have ever seen.<br /> I don't know if it will help me with my programs because I can't really find much use in most of it but I definitely had a LOT of fun reading them the tutorials are so informative and manage to explain very complicated stuff really quickly it's very impressive I would love it if you wrote more</p> <p>p s:</p> <p>I think we will reach this material in school in about 3 years!! so I'm pretty much set for a while</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-580407">Website Discussion and Feedback / Website Feedback</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-630209/thank-you">Thank you.....</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635999#post-1736413</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem#post-1736413</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 20:56:33 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Is this 2D or 3D? Perhaps it doesn't matter. (I'll assume 2D, because you said &quot;sprite&quot;, which is definitely a 2D term.)</p> <p>I still am not understanding what's preventing the ship from moving past X=0. Do you have a line of code that is something like this?</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">position</span><span class="hl-code">.</span><span class="hl-identifier">X</span><span class="hl-code"> &lt; </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">position</span><span class="hl-code">.</span><span class="hl-identifier">X</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>The same kind of code should work on the right side, but you should be using the window width instead.</p> <p>One other thing that comes to mind in this discussion is that usually, the &quot;origin point&quot; of your ship is in the top left corner. If you draw at (0, 0), the full ship will be shown, starting from the upper left corner of the screen.</p> <p>Let's say your window is 800x480. If you draw at (800, 480), you won't see the ship at all, because its top left corner is the bottom right corner of the screen/window. It's drawn entirely off screen.</p> <p>So you'll want to account for that in your calculation. Let's say your ship is 32x32 pixels. The furthest to the right that you'd want to draw your ship, to ensure that it's completely on the screen, would be (768, 448).</p> <p>(You'd, of course, want to design this better for any size screen and any size sprite, rather than just dumping in the magic number 768 into your screen, but that's the idea.)</p> <p>I'm not sure we're really getting to the bottom of your question, yet, though, so keep asking questions until we do. :D</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem">Fullscreen Problem</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635999#post-1736403</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem#post-1736403</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 20:37:36 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>When X hits Zero(on the far left) my Sprite won't go part that.</p> <p>No, don't have any code to keep it going out of screen on the right. So, I just need to add If Statments to keep it from going off the screen on the right?</p> <p>Was just wondering why it didn't do the same on the left. If this is normal fine, just want to make sure its not something I'm doing wrong. If i try to draw something past 650Width, in FullScreen Mode, it gets drawn out of screen. Thank you for the reply!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem">Fullscreen Problem</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635999#post-1736370</guid>
				<title>Re: Fullscreen Problem</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem#post-1736370</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 19:29:22 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'm not sure what you mean by &quot;it stops at X = 0&quot;. Do you have code that stops the ship from moving when it reaches the edge of the screen?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem">Fullscreen Problem</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635999#post-1736289</guid>
				<title>Fullscreen Problem</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem#post-1736289</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 17:22:48 +0000</pubDate>
				<wikidot:authorName>Sorthious</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I've used the Fullscreen tutorial and got it to run. I created a Spaceship at the bottom of the screen and use the mouse to move it left or right. It stops at X= 0 on the left side, but the right side just keeps going for what seems like maybe 50-75 pixles. I had set the background image to W=800&#160;H= 480.</p> <p>This is the code that I have in the Game Constructor:</p> <div class="code"> <pre> <code>graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 480; graphics.IsFullScreen = true;</code> </pre></div> <p>I did have the: &quot;graphics.ApplyChanges();&quot; part in there but read that I didn't need it(i've tried it with and without also.)<br /> What am I doing wrong to get this extended screen. I have thought of limiting the mouse movement with If statements, and being wary of where I draw sprites but really would like to find out how to fix this problem. Thanks in advance!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635999/fullscreen-problem">Fullscreen Problem</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-141628#post-1736180</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-141628/troubleshooting:texturing-shader#post-1736180</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 14:24:23 +0000</pubDate>
				<wikidot:authorName>Pablo</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hello!! Sorry the delay in my answer.<br /> First at all i have to thank you for the quickly answer, I'm going to try with your second idea (Use a shader that doesn't require texture coordinates).<br /> Right now I'm out of time to do it, but when I do I will comment on the results and the solution I've found.</p> <p>Thanks again for the answer and your work.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-141628/troubleshooting:texturing-shader">Troubleshooting: Texturing Shader</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-635858#post-1736036</guid>
				<title>How to work with joints in XNA 4.0</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-635858/how-to-work-with-joints-in-xna-4-0#post-1736036</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 08:48:55 +0000</pubDate>
				<wikidot:authorName>KikeP</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi!!.. I recently found this blog (Which I think is pretty cool).<br /> And I think you could help me with this problem.<br /> I have a trouble coding with XNA.<br /> I want to use a 3D model with joints and then I want to manipulate them in XNA with code.<br /> How can I do that?<br /> Do I need an especial format for my 3D model??<br /> Thank You very much</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38230">XNA / XNA Questions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-635858/how-to-work-with-joints-in-xna-4-0">How to work with joints in XNA 4.0</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-139889#post-1735793</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-139889/troubleshooting:creating-a-content-pipeline-extension#post-1735793</link>
				<description></description>
				<pubDate>Fri, 22 Mar 2013 00:28:05 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Pretty great tutorials man, I'm learning a lot, but I have a question, can you task the level importer with loading large .pngs that act as maps? Also is there a way to implement this into a player/sprite class, where all the movement of the player is processed by the importer and then all the main game class has to do is draw the player position?</p> <p>For Example:</p> <div class="code"> <pre> <code> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; ParticleEngine particleEngine; Vector2 playerPosition; Vector2 playerVelocity = Vector2.One; Texture2D playerunarmed; Texture2D playerM1911; KeyboardState keyState; private SpriteFont font1; private SpriteFont font2; private Vector2 cursorPos; private Texture2D cursorTex; private Texture2D cursorTexHit; float angle; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = &quot;Content&quot;; } protected override void Initialize() { base.Initialize(); playerPosition = new Vector2(400, 400); this.IsMouseVisible = false; } protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); List&lt;Texture2D&gt; textures = new List&lt;Texture2D&gt;(); textures.Add(Content.Load&lt;Texture2D&gt;(&quot;GFX/EFFECT/circle&quot;)); textures.Add(Content.Load&lt;Texture2D&gt;(&quot;GFX/EFFECT/star&quot;)); textures.Add(Content.Load&lt;Texture2D&gt;(&quot;GFX/EFFECT/diamond&quot;)); playerunarmed = Content.Load&lt;Texture2D&gt;(&quot;GFX/PERSON/PLAYER&quot;); playerM1911 = Content.Load&lt;Texture2D&gt;(&quot;GFX/PERSON/PLAYERM1911&quot;); font1 = Content.Load&lt;SpriteFont&gt;(&quot;GFX/FONT/Font1&quot;); font2 = Content.Load&lt;SpriteFont&gt;(&quot;GFX/FONT/Font2&quot;); cursorTex = Content.Load&lt;Texture2D&gt;(&quot;GFX/EFFECT/Cursor&quot;); cursorTexHit = Content.Load&lt;Texture2D&gt;(&quot;GFX/EFFECT/CursorHit&quot;); LevelLibrary.Level level = Content.Load&lt;LevelLibrary.Level&gt;(&quot;level1&quot;); particleEngine = new ParticleEngine(textures, new Vector2(400, 240)); } protected override void UnloadContent() { } protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); MouseState curMouse = Mouse.GetState(); cursorPos = new Vector2(curMouse.X +90, curMouse.Y); Vector2 mouseLoc = new Vector2(curMouse.X, curMouse.Y); Vector2 direction = mouseLoc - playerPosition; int x = curMouse.X; int y = curMouse.Y; angle = (float)(Math.Atan2(direction.Y, direction.X)); keyState = Keyboard.GetState(); if (keyState.IsKeyDown(Keys.D)) playerPosition.X += playerVelocity.X; if (keyState.IsKeyDown(Keys.A)) playerPosition.X -= playerVelocity.X; if (keyState.IsKeyDown(Keys.W)) playerPosition.Y -= playerVelocity.Y; if (keyState.IsKeyDown(Keys.S)) playerPosition.Y += playerVelocity.Y; particleEngine.EmitterLocation = new Vector2(200, 240); particleEngine.Update(); base.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.SkyBlue); spriteBatch.Begin(); spriteBatch.Draw(cursorTex, cursorPos, Color.White); spriteBatch.Draw(playerM1911, new Rectangle((int)playerPosition.X, (int)playerPosition.Y, playerunarmed.Width, playerunarmed.Height), null, Color.White, angle + 90, new Vector2(65, 67), SpriteEffects.None, 0f); spriteBatch.End(); particleEngine.Draw(spriteBatch); base.Draw(gameTime); } } }</code> </pre></div> <p>As you can see this is my main Game1.cs, with stuff from your previous tutorials thrown in, but I want the player to be his own outside file (much like the .level files you made in this tutorial. I simply don't want the players movement controls and texture2D loads to clutter up the main game class.</p> <p>Thanks!! Any help is appreciated, I'll probably be up all night trying to solve this.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-139889/troubleshooting:creating-a-content-pipeline-extension">Troubleshooting: Creating a Content Pipeline Extension</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1735745</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1735745</link>
				<description></description>
				<pubDate>Thu, 21 Mar 2013 23:22:06 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Thank You!! That did it!!!</p> <p>I'm so friggin happy about this!!! You got a fan pal!!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1735737</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1735737</link>
				<description></description>
				<pubDate>Thu, 21 Mar 2013 23:10:48 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I don't think you'll need any method overloads or anything. It should be simpler than that. Think of the items listed inside of your <em>Particle</em> class as properties that are specific to an individual particle. For example, each individual particle has it's own <em>Size</em>, <em>Position</em>, <em>Velocity</em>, etc. Each one will have its own color as well, which is what the <em>Color</em> property was for.</p> <p>Now you can dump whatever values you want into the various properties for each individual particle you create. Each one will be assigned its own unique value for velocity, size, etc. And when you're drawing a particular particle, it will use the values that are assigned to the property for the given particle.</p> <p>Basically, what that means is you don't need to create a separate <em>Color2</em> property. Just stick with the one color, and just fill some of them with red, and some with yellow.</p> <p>That change would be back in the <em>GenerateNewParticle</em> method, over in the <em>ParticleEngine</em> class. In the tutorial, I have the following code for picking a color randomly:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Color</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code">, </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code">, </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">())</span><span class="hl-code">;</span> </pre></div> </div> <p>To randomly choose between two colors, you might do something like this:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code">; </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">Next</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-brackets">)</span><span class="hl-code"> == </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Red</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Yellow</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>This code will pick a random number up to, but not including 2, starting with 0. If I had done 5, it would choose a number up to, but not including 5, including 0. Basically, it gives us one of 2 (or one of 5) options ranging from 0 to N-1. In the case of the code above, that will be 0 or 1, with pretty dang close to 50% probability of each one. If it's a 0, we use red, if it's a 1, we use yellow.</p> <p>Note that you could throw in a third color like this:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code">; </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">randomNumber</span><span class="hl-code"> = </span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">Next</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">randomNumber</span><span class="hl-code"> == </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Red</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">randomNumber</span><span class="hl-code"> == </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Yellow</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Blue</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>It's worth pointing out that in this code, I've pulled out the random number generation from the if/else block. This is because we only want to pick the random number once, right before we decide which color the number represents.</p> <p>One final thing is that you could also generate particles in an uneven way by going back to the <em>NextDouble</em> method:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code">; </span><span class="hl-types">double</span><span class="hl-code"> </span><span class="hl-identifier">randomNumber</span><span class="hl-code"> = </span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">Next</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">randomNumber</span><span class="hl-code"> &lt; </span><span class="hl-number">0.10</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Red</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">randomNumber</span><span class="hl-code"> &lt; </span><span class="hl-number">0.40</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Yellow</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-identifier">Color</span><span class="hl-code">.</span><span class="hl-identifier">Blue</span><span class="hl-code">; </span><span class="hl-brackets">}</span> </pre></div> </div> <p>This gives us a 10% chance of building red particles, a 30% (0.4-0.1) chance of building yellow particles, and a 60% chance of generating blue particles.</p> <p>As you can probably see, the possibilities with this kind of stuff are endless. :D</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1734631</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1734631</link>
				<description></description>
				<pubDate>Wed, 20 Mar 2013 18:01:23 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Its ok, I just want to have red stars and diamonds along with yellow stars and diamonds at the same time. Essentially, I want to do what you did in the tutorial, with the random colors coming off from the emitter location, except instead of random colors, I want two specific colors to come off the emitter location (Red and Yellow)</p> <div class="code"> <pre> <code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; namespace ParticleEngine2D { public class Particle { public Texture2D Texture { get; set; } public Vector2 Position { get; set; } public Vector2 Velocity { get; set; } public float Angle { get; set; } public float AngularVelocity { get; set; } public Color Color { get; set; } public Color Color2 { get; set; } public float Size { get; set; } public int TTL { get; set; } public Particle(Texture2D texture, Vector2 position, Vector2 velocity, float angle, float angularVelocity, Color color, Color color2, float size, int ttl) { Texture = texture; Position = position; Velocity = velocity; Angle = angle; AngularVelocity = angularVelocity; Color = color; Color2 = color2; Size = size; TTL = ttl; } public void Update() { TTL--; Position += Velocity; Angle += AngularVelocity; } public void Draw(SpriteBatch spriteBatch) { Rectangle sourceRectangle = new Rectangle(0, 0, Texture.Width, Texture.Height); Vector2 origin = new Vector2(Texture.Width / 2, Texture.Height / 2); spriteBatch.Draw(Texture, Position, sourceRectangle, Color, Color2, Angle, origin, Size, SpriteEffects.None, 0f); } } }</code> </pre></div> <p>Here is the code for my Particle class, I tried to add the Color 2 into the spriteBatch.Draw method, it hits me with the error &quot;Error 3 No overload for method 'Draw' takes 10 arguments&quot;</p> <p>I assume that I must add the an overload for the number of arguments somewhere, but I don't know WHERE exactly, thanks for your time :D</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1734599</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1734599</link>
				<description></description>
				<pubDate>Wed, 20 Mar 2013 17:09:32 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I started writing an answer to this yesterday, then got distracted and forgot. Now I have to rewrite what I had written. :)</p> <p>Two things stand out to me here. In your <em>/Particle</em> class's constructor, you have this code:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> = </span><span class="hl-identifier">color</span><span class="hl-code">; </span><span class="hl-identifier">Color</span><span class="hl-code"> = </span><span class="hl-identifier">color2</span><span class="hl-code">;</span> </pre></div> </div> <p>Shouldn't that say the following?</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Color</span><span class="hl-code"> = </span><span class="hl-identifier">color</span><span class="hl-code">; </span><span class="hl-identifier">Color2</span><span class="hl-code"> = </span><span class="hl-identifier">color2</span><span class="hl-code">;</span> </pre></div> </div> <p>You're assigning to the same Color property both times, which doesn't seem like what you actually intend.</p> <p>Second, <em>Color2</em> is never actually used anywhere in your draw code. So even if you get it assigned correctly, you wouldn't ever see that color.</p> <p>So I'm not exactly sure what you want to do with the second color. Perhaps you want particles to fade from one color to another? From <em>Color</em> to <em>Color2</em>? Something like that could easily be done, but you'll, of course, need to write the code for it.</p> <p>Anyway, the point is, <em>Color2</em> isn't used anywhere (other than being defined, and after you make the first change, assigned a value) so you shouldn't be seeing it yet.</p> <p>If you get hung up on how to use the second color, let me know what you're wanting to accomplish by having two colors, and I'll see how I can help.</p> <p>Hope that keeps you moving forward though!</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1734140</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1734140</link>
				<description></description>
				<pubDate>Tue, 19 Mar 2013 22:38:15 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I'm not getting any compile errors with my Particle class, just the yellow instead of yellow and red, but here is my particle class, pretty much copied word for word except with a few changes</p> <div class="code"> <pre> <code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; namespace ParticleEngine2D { public class Particle { public Texture2D Texture { get; set; } public Vector2 Position { get; set; } public Vector2 Velocity { get; set; } public float Angle { get; set; } public float AngularVelocity { get; set; } public Color Color { get; set; } public Color Color2 { get; set; } public float Size { get; set; } public int TTL { get; set; } public Particle(Texture2D texture, Vector2 position, Vector2 velocity, float angle, float angularVelocity, Color color, Color color2, float size, int ttl) { Texture = texture; Position = position; Velocity = velocity; Angle = angle; AngularVelocity = angularVelocity; Color = color; Color = color2; Size = size; TTL = ttl; } public void Update() { TTL--; Position += Velocity; Angle += AngularVelocity; } public void Draw(SpriteBatch spriteBatch) { Rectangle sourceRectangle = new Rectangle(0, 0, Texture.Width, Texture.Height); Vector2 origin = new Vector2(Texture.Width / 2, Texture.Height / 2); spriteBatch.Draw(Texture, Position, sourceRectangle, Color, Angle, origin, Size, SpriteEffects.None, 0f); } } }</code> </pre></div> <p>I really like your tutorials btw, really helpful and trained towards noobs like me :D</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1733984</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1733984</link>
				<description></description>
				<pubDate>Tue, 19 Mar 2013 18:30:46 +0000</pubDate>
				<wikidot:authorName>rbwhitaker</wikidot:authorName>				<wikidot:authorUserId>88099</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It would appear that you're trying to add on to what the <em>Particle</em> class can do, right? I've only got one color in my <em>Particle</em> class, if I'm remembering correctly.</p> <p>I suspect something is going wrong inside of your <em>Particle</em> class. Would you mind posting your code for that? I think we'd be able to get to the bottom of it pretty quickly if we could see the code.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1733925</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1733925</link>
				<description></description>
				<pubDate>Tue, 19 Mar 2013 16:35:12 +0000</pubDate>
				<wikidot:authorName>Regen2100</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Hi. Great tutorial so far, I've got the engine working, and I've changed the color of the emitted particles, but I'm stuck on how to use two particles at once (a red and yellow one) I've tried this:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Texture2D</span><span class="hl-code"> </span><span class="hl-identifier">texture</span><span class="hl-code"> = </span><span class="hl-identifier">textures</span><span class="hl-brackets">[</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">Next</span><span class="hl-brackets">(</span><span class="hl-identifier">textures</span><span class="hl-code">.</span><span class="hl-identifier">Count</span><span class="hl-brackets">)]</span><span class="hl-code">; </span><span class="hl-identifier">Vector2</span><span class="hl-code"> </span><span class="hl-identifier">position</span><span class="hl-code"> = </span><span class="hl-identifier">EmitterLocation</span><span class="hl-code">; </span><span class="hl-identifier">Vector2</span><span class="hl-code"> </span><span class="hl-identifier">velocity</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Vector2</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-identifier">f</span><span class="hl-code"> * </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)(</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code"> * </span><span class="hl-number">2</span><span class="hl-code"> - </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-identifier">f</span><span class="hl-code"> * </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)(</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code"> * </span><span class="hl-number">2</span><span class="hl-code"> - </span><span class="hl-number">1</span><span class="hl-brackets">))</span><span class="hl-code">; </span><span class="hl-types">float</span><span class="hl-code"> </span><span class="hl-identifier">angle</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-types">float</span><span class="hl-code"> </span><span class="hl-identifier">angularVelocity</span><span class="hl-code"> = </span><span class="hl-number">0.1</span><span class="hl-identifier">f</span><span class="hl-code"> * </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)(</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code"> * </span><span class="hl-number">2</span><span class="hl-code"> - </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Color</span><span class="hl-brackets">(</span><span class="hl-number">255</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">Color</span><span class="hl-code"> </span><span class="hl-identifier">color2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Color</span><span class="hl-brackets">(</span><span class="hl-number">229</span><span class="hl-code">, </span><span class="hl-number">183</span><span class="hl-code">, </span><span class="hl-number">37</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-types">float</span><span class="hl-code"> </span><span class="hl-identifier">size</span><span class="hl-code"> = </span><span class="hl-brackets">(</span><span class="hl-types">float</span><span class="hl-brackets">)</span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">NextDouble</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">ttl</span><span class="hl-code"> = </span><span class="hl-number">20</span><span class="hl-code"> + </span><span class="hl-identifier">random</span><span class="hl-code">.</span><span class="hl-identifier">Next</span><span class="hl-brackets">(</span><span class="hl-number">40</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Particle</span><span class="hl-brackets">(</span><span class="hl-identifier">texture</span><span class="hl-code">, </span><span class="hl-identifier">position</span><span class="hl-code">, </span><span class="hl-identifier">velocity</span><span class="hl-code">, </span><span class="hl-identifier">angle</span><span class="hl-code">, </span><span class="hl-identifier">angularVelocity</span><span class="hl-code">, </span><span class="hl-identifier">color</span><span class="hl-code">, </span><span class="hl-identifier">color2</span><span class="hl-code">, </span><span class="hl-identifier">size</span><span class="hl-code">, </span><span class="hl-identifier">ttl</span><span class="hl-brackets">)</span><span class="hl-code">;</span> </pre></div> </div> <br /> I also added the other variables needed, but now it shows only the yellow (2nd) color. What happened? How do I fix it?<br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-634687#post-1733441</guid>
				<title>WPF Refrences</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-634687/wpf-refrences#post-1733441</link>
				<description></description>
				<pubDate>Mon, 18 Mar 2013 23:21:55 +0000</pubDate>
				<wikidot:authorName>Travis</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Good afternoon Mr. Whitaker,</p> <p>I am almost through your C# Players Guide book. Which I might add is an excellent book and when I am done I will give it a great review on amazon. I was wondering if you know any good books or websites that go over how to create applications for WPF?</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-505041">C# / General C# Programming</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-634687/wpf-refrences">WPF Refrences</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1731843</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1731843</link>
				<description></description>
				<pubDate>Sat, 16 Mar 2013 03:44:27 +0000</pubDate>
				<wikidot:authorName>lchittenden</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Yeah it worked. Thank you so much.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-136046#post-1731820</guid>
				<title></title>
				<link>http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines#post-1731820</link>
				<description></description>
				<pubDate>Sat, 16 Mar 2013 02:19:16 +0000</pubDate>
				<wikidot:authorName>lchittenden</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I am using Internet Explore 8.</p> <p>I downloaded them and am trying them now.<br /> I will let you know how it works.<br /> I really like your tutorials I hope you keep expanding on them. I am a newbee and you are teaching me so much.</p> <br/>Forum category: <a href="http://rbwhitaker.wikidot.com/forum/c-38229">Hidden / Per page discussions</a><br/>Forum thread: <a href="http://rbwhitaker.wikidot.com/forum/t-136046/troubleshooting:2d-particle-engines">Troubleshooting: 2D Particle Engines</a>
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>